Class AbstractDeltaReplicatedData<A extends AbstractDeltaReplicatedData<A,B>,B extends ReplicatedDelta>

java.lang.Object
org.apache.pekko.cluster.ddata.AbstractReplicatedData<A>
org.apache.pekko.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 a DeltaReplicatedData in Java.

The type parameter A is a self-recursive type to be defined by the concrete implementation. E.g. class TwoPhaseSet extends AbstractDeltaReplicatedData&lt;TwoPhaseSet, TwoPhaseSet&gt;

  • Constructor Details

    • AbstractDeltaReplicatedData

      public AbstractDeltaReplicatedData()
  • Method Details

    • delta

      public final scala.Option<ReplicatedDelta> delta()
      Delegates to deltaData(), which must be implemented by subclass.
      Specified by:
      delta in interface DeltaReplicatedData
    • deltaData

      public abstract Optional<B> deltaData()
      The accumulated delta of mutator operations since previous DeltaReplicatedData.resetDelta(). When the Replicator invokes the modify function of the Update 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 the Replicator with the deltaData() accessor. The modify function shall still return the full state in the same way as ReplicatedData without support for deltas.
    • mergeDelta

      public final ReplicatedData mergeDelta(ReplicatedDelta that)
      Delegates to mergeDeltaData(B), which must be implemented by subclass.
    • mergeDeltaData

      public abstract A mergeDeltaData(B that)
      When delta is merged into the full state this method is used. When the type D of the delta is of the same type as the full state T this method can be implemented by delegating to mergeData.