Package io.cloudstate.javasupport.crdt
Interface CrdtFactory
-
- All Known Subinterfaces:
CommandContext,CrdtCreationContext,StreamedCommandContext<Output>
public interface CrdtFactoryFactory 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 Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description FlagnewFlag()Create a new Flag.GCounternewGCounter()Create a new GCounter.<T> GSet<T>newGSet()Create a new GSet.<T> LWWRegister<T>newLWWRegister(T value)Create a new LWWRegister.<K,V extends Crdt>
ORMap<K,V>newORMap()Create a new ORMap.<T> ORSet<T>newORSet()Create a new ORSet.PNCounternewPNCounter()Create a new PNCounter.VotenewVote()Create a new Vote.
-
-
-
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.
-
newVote
Vote newVote()
Create a new Vote.- Returns:
- The new Vote.
-
-