Package akka.cluster.ddata
Interface DeltaReplicatedData
-
- All Superinterfaces:
ReplicatedData
- All Known Implementing Classes:
AbstractDeltaReplicatedData
,GCounter
,GSet
,LWWMap
,ORMap
,ORMultiMap
,ORSet
,PNCounter
,PNCounterMap
public interface DeltaReplicatedData extends ReplicatedData
The type of the delta. To be specified by subclass. It may be the same type asT
or a different type if needed. For exampleGSet
uses the same type andORSet
uses different types.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description scala.Option<ReplicatedDelta>
delta()
The accumulated delta of mutator operations since previousresetDelta()
.DeltaReplicatedData
mergeDelta(DeltaReplicatedData thatDelta)
When delta is merged into the full state this method is used.DeltaReplicatedData
resetDelta()
Reset collection of deltas from mutator operations.-
Methods inherited from interface akka.cluster.ddata.ReplicatedData
merge
-
-
-
-
Method Detail
-
delta
scala.Option<ReplicatedDelta> delta()
The accumulated delta of mutator operations since previousresetDelta()
. When theReplicator
invokes themodify
function of theUpdate
message and the user code is invoking one or more mutator operations the data is collecting the delta of the operations and makes it available for theReplicator
with thedelta()
accessor. Themodify
function shall still return the full state in the same way asReplicatedData
without support for deltas.- Returns:
- (undocumented)
-
mergeDelta
DeltaReplicatedData mergeDelta(DeltaReplicatedData thatDelta)
When delta is merged into the full state this method is used. When the typeD
of the delta is of the same type as the full stateT
this method can be implemented by delegating tomerge
.- Parameters:
thatDelta
- (undocumented)- Returns:
- (undocumented)
-
resetDelta
DeltaReplicatedData resetDelta()
Reset collection of deltas from mutator operations. When theReplicator
invokes themodify
function of theUpdate
message the delta is always "reset" and when the user code is invoking one or more mutator operations the data is collecting the delta of the operations and makes it available for theReplicator
with thedelta()
accessor. When theReplicator
has grabbed thedelta
it will invoke this method to get a clean data instance without the delta.- Returns:
- (undocumented)
-
-