Class DistributedData$
java.lang.Object
org.apache.pekko.actor.typed.ExtensionId<DistributedData>
org.apache.pekko.cluster.ddata.typed.scaladsl.DistributedData$
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final DistributedData$Static reference to the singleton instance of this Scala object. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateExtension(ActorSystem<?> system) Create the extension, will be invoked at most one time per actor system where the extension is registered.get(ActorSystem<?> system) <A,B extends ReplicatedData>
Behavior<A>withReplicatorMessageAdapter(scala.Function1<ReplicatorMessageAdapter<A, B>, Behavior<A>> factory) When interacting with theDistributedData.replicatorfrom an actor theReplicatorMessageAdapterprovides convenient methods that adapts the response messages to the requesting actor's message protocol.Methods inherited from class org.apache.pekko.actor.typed.ExtensionId
apply, equals, hashCode, id
-
Field Details
-
MODULE$
Static reference to the singleton instance of this Scala object.
-
-
Constructor Details
-
DistributedData$
public DistributedData$()
-
-
Method Details
-
get
-
createExtension
Description copied from class:ExtensionIdCreate the extension, will be invoked at most one time per actor system where the extension is registered.- Specified by:
createExtensionin classExtensionId<DistributedData>
-
withReplicatorMessageAdapter
public <A,B extends ReplicatedData> Behavior<A> withReplicatorMessageAdapter(scala.Function1<ReplicatorMessageAdapter<A, B>, Behavior<A>> factory) When interacting with theDistributedData.replicatorfrom an actor theReplicatorMessageAdapterprovides convenient methods that adapts the response messages to the requesting actor's message protocol.One
ReplicatorMessageAdapterinstance can be used for a givenReplicatedDatatype, e.g. anOrSet[String]. Interaction with severalpekko.cluster.ddata.Keys can be used via the same adapter but they must all be of the sameReplicatedDatatype. For interaction with several differentReplicatedDatatypes, e.g. anOrSet[String]and aGCounter, an adapter can be created for each type.*Warning*: A
ReplicatorMessageAdapterinstance is not thread-safe and must only be used from a single actor It must not be accessed from threads other than the ordinary actor message processing thread, such asFuturecallbacks. It must not be shared between several actor instances.- Parameters:
factory- Factory of theBehaviorfor the actor that is using theReplicatorMessageAdapter
-