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
Java API: Interface for implementing aDeltaReplicatedData
in Java.The type parameter
A
is a self-recursive type to be defined by the concrete implementation. E.g.class TwoPhaseSet extends AbstractDeltaReplicatedData<TwoPhaseSet, TwoPhaseSet>
-
-
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
-
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.
-
mergeDelta
public final ReplicatedData mergeDelta(ReplicatedDelta that)
Delegates tomergeDeltaData(B)
, which must be implemented by subclass.
-
-