Package akka.cluster.ddata
Class AbstractDeltaReplicatedData<A extends AbstractDeltaReplicatedData<A,B>,B extends ReplicatedDelta>
- java.lang.Object
-
- akka.cluster.ddata.AbstractReplicatedData<A>
-
- akka.cluster.ddata.AbstractDeltaReplicatedData<A,B>
-
- All Implemented Interfaces:
DeltaReplicatedData
,ReplicatedData
public abstract class AbstractDeltaReplicatedData<A extends AbstractDeltaReplicatedData<A,B>,B extends ReplicatedDelta> extends AbstractReplicatedData<A> implements DeltaReplicatedData
Delegates todeltaData()
, which must be implemented by subclass.
-
-
Constructor Summary
Constructors Constructor Description AbstractDeltaReplicatedData()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description scala.Option<ReplicatedDelta>
delta()
Delegates todeltaData()
, which must be implemented by subclass.abstract java.util.Optional<B>
deltaData()
The accumulated delta of mutator operations since previousDeltaReplicatedData.resetDelta()
.ReplicatedData
mergeDelta(ReplicatedDelta that)
Delegates tomergeDeltaData(B)
, which must be implemented by subclass.abstract A
mergeDeltaData(B that)
When delta is merged into the full state this method is used.-
Methods inherited from class akka.cluster.ddata.AbstractReplicatedData
merge, mergeData
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface akka.cluster.ddata.DeltaReplicatedData
mergeDelta, resetDelta
-
Methods inherited from interface akka.cluster.ddata.ReplicatedData
merge
-
-
-
-
Method Detail
-
delta
public final scala.Option<ReplicatedDelta> delta()
Delegates todeltaData()
, which must be implemented by subclass.- Specified by:
delta
in interfaceDeltaReplicatedData
- Returns:
- (undocumented)
-
deltaData
public abstract java.util.Optional<B> deltaData()
The accumulated delta of mutator operations since previousDeltaReplicatedData.resetDelta()
. 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 thedeltaData()
accessor. Themodify
function shall still return the full state in the same way asReplicatedData
without support for deltas.- Returns:
- (undocumented)
-
mergeDelta
public final ReplicatedData mergeDelta(ReplicatedDelta that)
Delegates tomergeDeltaData(B)
, which must be implemented by subclass.- Parameters:
that
- (undocumented)- Returns:
- (undocumented)
-
mergeDeltaData
public abstract A mergeDeltaData(B that)
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 tomergeData
.- Parameters:
that
- (undocumented)- Returns:
- (undocumented)
-
-