Class DistributedData$
- java.lang.Object
-
- akka.actor.typed.ExtensionId<DistributedData>
-
- akka.cluster.ddata.typed.scaladsl.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 DistributedData
createExtension(ActorSystem<?> system)
Create the extension, will be invoked at most one time per actor system where the extension is registered.DistributedData
get(ActorSystem<?> system)
<A,B extends ReplicatedData>
Behavior<A>withReplicatorMessageAdapter(scala.Function1<ReplicatorMessageAdapter<A,B>,Behavior<A>> factory)
When interacting with theDistributedData.replicator
from an actor theReplicatorMessageAdapter
provides 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:ExtensionId
Create the extension, will be invoked at most one time per actor system where the extension is registered.- Specified by:
createExtension
in classExtensionId<DistributedData>
-
withReplicatorMessageAdapter
public <A,B extends ReplicatedData> Behavior<A> withReplicatorMessageAdapter(scala.Function1<ReplicatorMessageAdapter<A,B>,Behavior<A>> factory)
When interacting with theDistributedData.replicator
from an actor theReplicatorMessageAdapter
provides convenient methods that adapts the response messages to the requesting actor's message protocol.One
ReplicatorMessageAdapter
instance can be used for a givenReplicatedData
type, e.g. anOrSet[String]
. Interaction with severalKey
s can be used via the same adapter but they must all be of the sameReplicatedData
type. For interaction with several differentReplicatedData
types, e.g. anOrSet[String]
and aGCounter
, an adapter can be created for each type.*Warning*: A
ReplicatorMessageAdapter
instance 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 asFuture
callbacks. It must not be shared between several actor instances.- Parameters:
factory
- Factory of theBehavior
for the actor that is using theReplicatorMessageAdapter
-
-