Interface ReplicatedData
-
- All Known Subinterfaces:
DeltaReplicatedData
,ORMap.DeltaOp
,ORSet.DeltaOp
,RemovedNodePruning
,ReplicatedDelta
,RequiresCausalDeliveryOfDeltas
- All Known Implementing Classes:
AbstractDeltaReplicatedData
,AbstractReplicatedData
,Flag
,GCounter
,GSet
,LWWMap
,LWWRegister
,ManyVersionVector
,OneVersionVector
,ORMap
,ORMultiMap
,ORSet
,PNCounter
,PNCounterMap
,Replicator.Internal$.DeletedData$
,VersionVector
public interface ReplicatedData
Interface for implementing a state based convergent replicated data type (CvRDT).ReplicatedData types must be serializable with an Akka Serializer. It is highly recommended to implement a serializer with Protobuf or similar. The built in data types are marked with
ReplicatedDataSerialization
and serialized withReplicatedDataSerializer
.Serialization of the data types are used in remote messages and also for creating message digests (SHA-1) to detect changes. Therefore it is important that the serialization produce the same bytes for the same content. For example sets and maps should be sorted deterministically in the serialization.
ReplicatedData types should be immutable, i.e. "modifying" methods should return a new instance.
Implement the additional methods of
DeltaReplicatedData
if it has support for delta-CRDT replication.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ReplicatedData
merge(ReplicatedData that)
Monotonic merge function.
-
-
-
Method Detail
-
merge
ReplicatedData merge(ReplicatedData that)
Monotonic merge function.
-
-