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 aDeltaReplicatedDatain Java.The type parameter
Ais 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().ReplicatedDatamergeDelta(ReplicatedDelta that)Delegates tomergeDeltaData(B), which must be implemented by subclass.abstract AmergeDeltaData(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:
deltain interfaceDeltaReplicatedData
-
deltaData
public abstract java.util.Optional<B> deltaData()
The accumulated delta of mutator operations since previousDeltaReplicatedData.resetDelta(). When theReplicatorinvokes themodifyfunction of theUpdatemessage 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 theReplicatorwith thedeltaData()accessor. Themodifyfunction shall still return the full state in the same way asReplicatedDatawithout support for deltas.
-
mergeDelta
public final ReplicatedData mergeDelta(ReplicatedDelta that)
Delegates tomergeDeltaData(B), which must be implemented by subclass.
-
-