Class Replicator
- java.lang.Object
-
- org.apache.pekko.cluster.ddata.typed.javadsl.Replicator
-
public class Replicator extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classReplicator.Changed<A extends ReplicatedData>The data value is retrieved withReplicator.Changed.get(org.apache.pekko.cluster.ddata.Key<T>)using the typed key.static classReplicator.Changed$static interfaceReplicator.Commandstatic classReplicator.DataDeleted<A extends ReplicatedData>static classReplicator.DataDeleted$static classReplicator.Delete<A extends ReplicatedData>Send this message to the localReplicatorto delete a data value for the givenkey.static classReplicator.Delete$static classReplicator.Deleted<A extends ReplicatedData>static classReplicator.Deleted$static classReplicator.DeleteFailure<A extends ReplicatedData>static classReplicator.DeleteFailure$static interfaceReplicator.DeleteResponse<A extends ReplicatedData>static classReplicator.DeleteSuccess<A extends ReplicatedData>static classReplicator.DeleteSuccess$static classReplicator.FlushChanges$INTERNAL API Obtain the instance of this class with theflushChanges()method.static classReplicator.Get<A extends ReplicatedData>Send this message to the localReplicatorto retrieve a data value for the givenkey.static classReplicator.Get$static classReplicator.GetDataDeleted<A extends ReplicatedData>TheReplicator.Getrequest couldn't be performed because the entry has been deleted.static classReplicator.GetDataDeleted$static classReplicator.GetFailure<A extends ReplicatedData>TheReplicator.Getrequest could not be fulfill according to the givenconsistency levelandtimeout.static classReplicator.GetFailure$static classReplicator.GetReplicaCountGet current number of replicas, including the local replica.static classReplicator.GetReplicaCount$static classReplicator.GetResponse<A extends ReplicatedData>static classReplicator.GetSuccess<A extends ReplicatedData>Reply fromGet.static classReplicator.GetSuccess$static classReplicator.ModifyFailure<A extends ReplicatedData>If themodifyfunction of theReplicator.Updatethrows an exception the reply message will be thisModifyFailuremessage.static classReplicator.ModifyFailure$static classReplicator.NotFound<A extends ReplicatedData>static classReplicator.NotFound$static classReplicator.ReadAllstatic classReplicator.ReadAll$static interfaceReplicator.ReadConsistencystatic classReplicator.ReadFromstatic classReplicator.ReadFrom$static classReplicator.ReadLocal$static classReplicator.ReadMajoritystatic classReplicator.ReadMajority$static classReplicator.ReplicaCountCurrent number of replicas.static classReplicator.ReplicaCount$static classReplicator.StoreFailure<A extends ReplicatedData>The local store or direct replication of theReplicator.Updatecould not be fulfill according to the givenconsistency leveldue to durable store errors.static classReplicator.StoreFailure$static classReplicator.Subscribe<A extends ReplicatedData>Register a subscriber that will be notified with aReplicator.Changedmessage when the value of the givenkeyis changed.static classReplicator.Subscribe$static interfaceReplicator.SubscribeResponse<A extends ReplicatedData>static classReplicator.Unsubscribe<A extends ReplicatedData>Unregister a subscriber.static classReplicator.Unsubscribe$static classReplicator.Update<A extends ReplicatedData>static classReplicator.Update$static classReplicator.UpdateDataDeleted<A extends ReplicatedData>TheReplicator.Updatecouldn't be performed because the entry has been deleted.static classReplicator.UpdateDataDeleted$static classReplicator.UpdateFailure<A extends ReplicatedData>static classReplicator.UpdateResponse<A extends ReplicatedData>static classReplicator.UpdateSuccess<A extends ReplicatedData>static classReplicator.UpdateSuccess$static classReplicator.UpdateTimeout<A extends ReplicatedData>The direct replication of theReplicator.Updatecould not be fulfill according to the givenconsistency levelandtimeout.static classReplicator.UpdateTimeout$static classReplicator.WriteAllstatic classReplicator.WriteAll$static interfaceReplicator.WriteConsistencystatic classReplicator.WriteLocal$static classReplicator.WriteMajoritystatic classReplicator.WriteMajority$static classReplicator.WriteTostatic classReplicator.WriteTo$
-
Constructor Summary
Constructors Constructor Description Replicator()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Behavior<Replicator.Command>behavior(ReplicatorSettings settings)TheBehaviorfor theReplicatoractor.static Behavior<Replicator.Command>behavior(ReplicatorSettings settings, ActorRef underlyingReplicator)TheBehaviorfor theReplicatoractor.static Replicator.CommandflushChanges()TheFlushChangesinstance.static Replicator.ReadConsistencyreadLocal()TheReadLocalinstancestatic Replicator.WriteConsistencywriteLocal()TheWriteLocalinstance
-
-
-
Method Detail
-
behavior
public static Behavior<Replicator.Command> behavior(ReplicatorSettings settings)
TheBehaviorfor theReplicatoractor.
-
behavior
public static Behavior<Replicator.Command> behavior(ReplicatorSettings settings, ActorRef underlyingReplicator)
TheBehaviorfor theReplicatoractor. It will use the given underlyingpekko.cluster.ddata.Replicator
-
readLocal
public static Replicator.ReadConsistency readLocal()
TheReadLocalinstance
-
writeLocal
public static Replicator.WriteConsistency writeLocal()
TheWriteLocalinstance
-
flushChanges
public static Replicator.Command flushChanges()
TheFlushChangesinstance. Notify subscribers of changes now, otherwise they will be notified periodically with the configurednotify-subscribers-interval.
-
-