Package akka.cluster.ddata.typed.javadsl
Class DistributedData$
- java.lang.Object
-
- akka.actor.typed.ExtensionId<DistributedData>
-
- akka.cluster.ddata.typed.javadsl.DistributedData$
-
public class DistributedData$ extends ExtensionId<DistributedData>
-
-
Field Summary
Fields Modifier and Type Field Description static DistributedData$MODULE$Static reference to the singleton instance of this Scala object.
-
Constructor Summary
Constructors Constructor Description DistributedData$()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DistributedDatacreateExtension(ActorSystem<?> system)Create the extension, will be invoked at most one time per actor system where the extension is registered.DistributedDataget(ActorSystem<?> system)<A,B extends ReplicatedData>
Behavior<A>withReplicatorMessageAdapter(java.util.function.Function<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 akka.actor.typed.ExtensionId
apply, equals, hashCode, id
-
-
-
-
Field Detail
-
MODULE$
public static final DistributedData$ MODULE$
Static reference to the singleton instance of this Scala object.
-
-
Method Detail
-
get
public DistributedData get(ActorSystem<?> system)
-
createExtension
public DistributedData createExtension(ActorSystem<?> system)
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(java.util.function.Function<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. Interaction with severalKeys can be used via the same adapter but they must all be of the sameReplicatedDatatype. For interaction with several differentReplicatedDatatypes, e.g. anOrSetand 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 asCompletionStagecallbacks. It must not be shared between several actor instances.- Parameters:
factory- Factory of theBehaviorfor the actor that is using theReplicatorMessageAdapter
-
-