Interface CrdtFactory

  • All Known Subinterfaces:
    CommandContext, CrdtCreationContext, StreamedCommandContext<Output>

    public interface CrdtFactory
    Factory for creating CRDTs.

    This is used both by CRDT contexts that allow creating CRDTs, as well as by CRDTs that allow nesting other CRDTs.

    CRDTs may only be created by a supplied CRDT factory, CRDTs created any other way will not be known by the library and so won't have their deltas synced to and from the proxy.

    • Method Detail

      • newGCounter

        GCounter newGCounter()
        Create a new GCounter.
        Returns:
        The new GCounter.
      • newPNCounter

        PNCounter newPNCounter()
        Create a new PNCounter.
        Returns:
        The new PNCounter.
      • newGSet

        <T> GSet<T> newGSet()
        Create a new GSet.
        Returns:
        The new GSet.
      • newORSet

        <T> ORSet<T> newORSet()
        Create a new ORSet.
        Returns:
        The new ORSet.
      • newFlag

        Flag newFlag()
        Create a new Flag.
        Returns:
        The new Flag.
      • newLWWRegister

        <T> LWWRegister<T> newLWWRegister​(T value)
        Create a new LWWRegister.
        Returns:
        The new LWWRegister.
      • newORMap

        <K,​V extends CrdtORMap<K,​V> newORMap()
        Create a new ORMap.
        Returns:
        The new ORMap.
      • newVote

        Vote newVote()
        Create a new Vote.
        Returns:
        The new Vote.