package javadsl
- Alphabetic
- Public
- Protected
Type Members
- abstract class DistributedData extends Extension
Akka extension for convenient configuration and use of the Replicator.
Akka extension for convenient configuration and use of the Replicator. Configuration settings are defined in the
akka.cluster.ddata
section, seereference.conf
.This is using the same underlying
Replicator
instance as akka.cluster.ddata.DistributedData and that means that typed and classic actors can share the same data.This class is not intended for user extension other than for test purposes (e.g. stub implementation). More methods may be added in the future and that may break such implementations.
- Annotations
- @DoNotInherit()
- final class DistributedDataSetup extends ExtensionSetup[DistributedData]
Can be used in akka.actor.setup.ActorSystemSetup when starting the ActorSystem to replace the default implementation of the DistributedData extension.
Can be used in akka.actor.setup.ActorSystemSetup when starting the ActorSystem to replace the default implementation of the DistributedData extension. Intended for tests that need to replace extension with stub/mock implementations.
- class ReplicatorMessageAdapter[A, B <: ReplicatedData] extends AnyRef
When interacting with the
Replicator
from an actor this class provides convenient methods that adapts the response messages to the requesting actor's message protocol.When interacting with the
Replicator
from an actor this class 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 several Keys 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.For the default replicator in the DistributedData extension a
ReplicatorMessageAdapter
can be created with DistributedData.withReplicatorMessageAdapter.*Warning*:
ReplicatorMessageAdapter
is not thread-safe and must only be used from the actor corresponding to the givenActorContext
. It must not be accessed from threads other than the ordinary actor message processing thread, such as java.util.concurrent.CompletionStage callbacks. It must not be shared between several actor instances.- A
Message type of the requesting actor.
- B
Type of the ReplicatedData.
Value Members
- object DistributedData extends ExtensionId[DistributedData]
- object DistributedDataSetup
- object Replicator
- See also
- object ReplicatorSettings