object Replicator
- Alphabetic
- By Inheritance
- Replicator
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- type Changed[A <: ReplicatedData] = Replicator.Changed[A]
The data value is retrieved with dd.Replicator.Changed.get using the typed key.
The data value is retrieved with dd.Replicator.Changed.get using the typed key.
- See also
- trait Command extends AnyRef
- type DataDeleted[A <: ReplicatedData] = Replicator.DataDeleted[A]
- final case class Delete[A <: ReplicatedData](key: Key[A], consistency: WriteConsistency, replyTo: ActorRef[DeleteResponse[A]]) extends Command with Product with Serializable
Send this message to the local
Replicator
to delete a data value for the givenkey
.Send this message to the local
Replicator
to delete a data value for the givenkey
. TheReplicator
will reply with one of the DeleteResponse messages. - type DeleteFailure[A <: ReplicatedData] = ReplicationDeleteFailure[A]
- type DeleteResponse[A <: ReplicatedData] = Replicator.DeleteResponse[A]
- type DeleteSuccess[A <: ReplicatedData] = Replicator.DeleteSuccess[A]
- type Deleted[A <: ReplicatedData] = Replicator.Deleted[A]
- See also
- type Expired[A <: ReplicatedData] = Replicator.Expired[A]
- See also
- final case class Get[A <: ReplicatedData](key: Key[A], consistency: ReadConsistency, replyTo: ActorRef[GetResponse[A]]) extends Command with Product with Serializable
Send this message to the local
Replicator
to retrieve a data value for the givenkey
.Send this message to the local
Replicator
to retrieve a data value for the givenkey
. TheReplicator
will reply with one of the GetResponse messages. - type GetDataDeleted[A <: ReplicatedData] = Replicator.GetDataDeleted[A]
The Get request couldn't be performed because the entry has been deleted.
- type GetFailure[A <: ReplicatedData] = Replicator.GetFailure[A]
The Get request could not be fulfill according to the given consistency level and timeout.
- final case class GetReplicaCount(replyTo: ActorRef[ReplicaCount]) extends Command with Product with Serializable
Get current number of replicas, including the local replica.
Get current number of replicas, including the local replica. Will reply to sender with ReplicaCount.
- type GetResponse[A <: ReplicatedData] = Replicator.GetResponse[A]
Reply from
Get
.Reply from
Get
. The data value is retrieved with dd.Replicator.GetSuccess.get using the typed key. - type GetSuccess[A <: ReplicatedData] = Replicator.GetSuccess[A]
- type ModifyFailure[A <: ReplicatedData] = Replicator.ModifyFailure[A]
If the
modify
function of the Update throws an exception the reply message will be thisModifyFailure
message.If the
modify
function of the Update throws an exception the reply message will be thisModifyFailure
message. The original exception is included ascause
. - type NotFound[A <: ReplicatedData] = Replicator.NotFound[A]
- type ReadAll = Replicator.ReadAll
- type ReadConsistency = Replicator.ReadConsistency
- type ReadFrom = Replicator.ReadFrom
- type ReadMajority = Replicator.ReadMajority
- type ReplicaCount = Replicator.ReplicaCount
Current number of replicas.
Current number of replicas. Reply to
GetReplicaCount
. - type StoreFailure[A <: ReplicatedData] = Replicator.StoreFailure[A]
The local store or direct replication of the Update could not be fulfill according to the given consistency level due to durable store errors.
The local store or direct replication of the Update could not be fulfill according to the given consistency level due to durable store errors. This is only used for entries that have been configured to be durable.
The
Update
was still performed in memory locally and possibly replicated to some nodes, but it might not have been written to durable storage. It will eventually be disseminated to other replicas, unless the local replica crashes before it has been able to communicate with other replicas. - final case class Subscribe[A <: ReplicatedData](key: Key[A], subscriber: ActorRef[SubscribeResponse[A]]) extends Command with Product with Serializable
Register a subscriber that will be notified with a Changed message when the value of the given
key
is changed.Register a subscriber that will be notified with a Changed message when the value of the given
key
is changed. Current value is also sent as a Changed message to a new subscriber.Subscribers will be notified periodically with the configured
notify-subscribers-interval
, and it is also possible to send an explicitFlushChanges
message to theReplicator
to notify the subscribers immediately.The subscriber will automatically be unregistered if it is terminated.
If the key is deleted the subscriber is notified with a Deleted message.
- type SubscribeResponse[A <: ReplicatedData] = Replicator.SubscribeResponse[A]
- See also
- final case class Unsubscribe[A <: ReplicatedData](key: Key[A], subscriber: ActorRef[SubscribeResponse[A]]) extends Command with Product with Serializable
Unregister a subscriber.
Unregister a subscriber.
- See also
- final case class Update[A <: ReplicatedData](key: Key[A], writeConsistency: WriteConsistency, replyTo: ActorRef[UpdateResponse[A]])(modify: (Option[A]) => A) extends Command with Product with Serializable
Send this message to the local
Replicator
to update a data value for the givenkey
.Send this message to the local
Replicator
to update a data value for the givenkey
. TheReplicator
will reply with one of the UpdateResponse messages.Note that the companion object provides
apply
functions for convenient construction of this message.The current data value for the
key
is passed as parameter to themodify
function. It isNone
if there is no value for thekey
, and otherwiseSome(data)
. The function is supposed to return the new value of the data, which will then be replicated according to the givenwriteConsistency
.The
modify
function is called by theReplicator
actor and must therefore be a pure function that only uses the data parameter and stable fields from enclosing scope. It must for example not accesssender()
reference of an enclosing actor. - type UpdateDataDeleted[A <: ReplicatedData] = Replicator.UpdateDataDeleted[A]
The Update couldn't be performed because the entry has been deleted.
- type UpdateFailure[A <: ReplicatedData] = Replicator.UpdateFailure[A]
- type UpdateResponse[A <: ReplicatedData] = Replicator.UpdateResponse[A]
- type UpdateSuccess[A <: ReplicatedData] = Replicator.UpdateSuccess[A]
- type UpdateTimeout[A <: ReplicatedData] = Replicator.UpdateTimeout[A]
The direct replication of the Update could not be fulfill according to the given consistency level and timeout.
The direct replication of the Update could not be fulfill according to the given consistency level and timeout.
The
Update
was still performed locally and possibly replicated to some nodes. It will eventually be disseminated to other replicas, unless the local replica crashes before it has been able to communicate with other replicas. - type WriteAll = Replicator.WriteAll
- type WriteConsistency = Replicator.WriteConsistency
- type WriteMajority = Replicator.WriteMajority
- type WriteTo = Replicator.WriteTo
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- val ReadLocal: Replicator.ReadLocal.type
- val WriteLocal: Replicator.WriteLocal.type
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def behavior(settings: ReplicatorSettings, underlyingReplicator: ActorRef): Behavior[Command]
The
Behavior
for theReplicator
actor.The
Behavior
for theReplicator
actor. It will use the given underlying akka.cluster.ddata.Replicator - def behavior(settings: ReplicatorSettings): Behavior[Command]
The
Behavior
for theReplicator
actor. - def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @HotSpotIntrinsicCandidate() @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- object Changed
The data value is retrieved with dd.Replicator.Changed.get using the typed key.
The data value is retrieved with dd.Replicator.Changed.get using the typed key.
- See also
- object DataDeleted
- object Delete extends Serializable
- object DeleteFailure
- object DeleteSuccess
- object Deleted
- object Expired
- object FlushChanges extends Command
Notify subscribers of changes now, otherwise they will be notified periodically with the configured
notify-subscribers-interval
. - object Get extends Serializable
- object GetDataDeleted
- object GetFailure
- object GetReplicaCount extends Serializable
- object GetSuccess
- object ModifyFailure
- object NotFound
- object ReadAll
- object ReadFrom
- object ReadMajority
- object ReplicaCount
- object StoreFailure
- object Update extends Serializable
- object UpdateDataDeleted
- object UpdateFailure
- object UpdateSuccess
- object UpdateTimeout
- object WriteAll
- object WriteMajority
- object WriteTo