Interface CrdtContext

    • Method Detail

      • state

        <T extends Crdt> java.util.Optional<T> state​(java.lang.Class<T> crdtClass)
                                              throws java.lang.IllegalStateException
        The current CRDT, if it's been created.
        Parameters:
        crdtClass - The type of the CRDT that is expected.
        Returns:
        The current CRDT, or empty if none has been created yet.
        Throws:
        java.lang.IllegalStateException - If the current CRDT does not match the passed in crdtClass type.
      • getWriteConsistency

        WriteConsistency getWriteConsistency()
        Get the current write consistency setting for replication of CRDT state.
        Returns:
        the current write consistency
      • setWriteConsistency

        void setWriteConsistency​(WriteConsistency writeConsistency)
        Set the write consistency setting for replication of CRDT state.
        Parameters:
        writeConsistency - the new write consistency to use