Replicator

org.apache.pekko.cluster.ddata.Replicator$
See theReplicator companion class
object Replicator

Attributes

Companion
class
Source
Replicator.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Replicator.type

Members list

Type members

Classlikes

final case class Changed[A <: ReplicatedData](key: Key[A])(data: A) extends SubscribeResponse[A], ReplicatorMessage

The data value is retrieved with get using the typed key.

The data value is retrieved with get using the typed key.

Attributes

See also
Source
Replicator.scala
Supertypes
trait Product
trait Equals
trait Serializable
class Object
trait Matchable
class Any
Show all
sealed trait Command[A <: ReplicatedData]

Attributes

Source
Replicator.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class Delete[A]
class Get[A]
class Update[A]
final case class DataDeleted[A <: ReplicatedData](key: Key[A], request: Option[Any]) extends RuntimeException, NoStackTrace, DeleteResponse[A]

Attributes

Source
Replicator.scala
Supertypes
trait Product
trait Equals
trait DeleteResponse[A]
trait NoStackTrace
class RuntimeException
class Exception
class Throwable
trait Serializable
class Object
trait Matchable
class Any
Show all
final case class Delete[A <: ReplicatedData](key: Key[A], consistency: WriteConsistency, request: Option[Any]) extends Command[A], NoSerializationVerificationNeeded

Send this message to the local Replicator to delete a data value for the given key. The Replicator will reply with one of the DeleteResponse messages.

Send this message to the local Replicator to delete a data value for the given key. The Replicator will reply with one of the DeleteResponse messages.

The optional request context is included in the reply messages. This is a convenient way to pass contextual information (e.g. original sender) without having to use ask or maintain local correlation data structures.

Attributes

Source
Replicator.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait Command[A]
class Object
trait Matchable
class Any
Show all

Attributes

Source
Replicator.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class DataDeleted[A]
class DeleteSuccess[A]
class StoreFailure[A]
final case class DeleteSuccess[A <: ReplicatedData](key: Key[A], request: Option[Any]) extends DeleteResponse[A]

Attributes

Source
Replicator.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait DeleteResponse[A]
class Object
trait Matchable
class Any
Show all
final case class Deleted[A <: ReplicatedData](key: Key[A]) extends SubscribeResponse[A]

Attributes

See also
Source
Replicator.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
case object FlushChanges

Notify subscribers of changes now, otherwise they will be notified periodically with the configured notify-subscribers-interval.

Notify subscribers of changes now, otherwise they will be notified periodically with the configured notify-subscribers-interval.

Attributes

Source
Replicator.scala
Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
Self type
final case class Get[A <: ReplicatedData](key: Key[A], consistency: ReadConsistency, request: Option[Any]) extends Command[A], ReplicatorMessage

Send this message to the local Replicator to retrieve a data value for the given key. The Replicator will reply with one of the GetResponse messages.

Send this message to the local Replicator to retrieve a data value for the given key. The Replicator will reply with one of the GetResponse messages.

The optional request context is included in the reply messages. This is a convenient way to pass contextual information (e.g. original sender) without having to use ask or maintain local correlation data structures.

Attributes

Source
Replicator.scala
Supertypes
trait Product
trait Equals
trait Serializable
trait Command[A]
class Object
trait Matchable
class Any
Show all
final case class GetDataDeleted[A <: ReplicatedData](key: Key[A], request: Option[Any]) extends GetResponse[A]

The Get request couldn't be performed because the entry has been deleted.

The Get request couldn't be performed because the entry has been deleted.

Attributes

Source
Replicator.scala
Supertypes
trait Serializable
trait Product
trait Equals
class GetResponse[A]
class Object
trait Matchable
class Any
Show all
final case class GetFailure[A <: ReplicatedData](key: Key[A], request: Option[Any]) extends GetResponse[A], ReplicatorMessage

The Get request could not be fulfill according to the given consistency level and timeout.

The Get request could not be fulfill according to the given consistency level and timeout.

Attributes

Source
Replicator.scala
Supertypes
trait Product
trait Equals
trait Serializable
class GetResponse[A]
class Object
trait Matchable
class Any
Show all
case object GetReplicaCount

Get current number of replicas, including the local replica. Will reply to sender with ReplicaCount.

Get current number of replicas, including the local replica. Will reply to sender with ReplicaCount.

Attributes

Source
Replicator.scala
Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
Self type
sealed abstract class GetResponse[A <: ReplicatedData] extends NoSerializationVerificationNeeded

Attributes

Source
Replicator.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class GetDataDeleted[A]
class GetFailure[A]
class GetSuccess[A]
class NotFound[A]
final case class GetSuccess[A <: ReplicatedData](key: Key[A], request: Option[Any])(data: A) extends GetResponse[A], ReplicatorMessage

Reply from Get. The data value is retrieved with get using the typed key.

Reply from Get. The data value is retrieved with get using the typed key.

Attributes

Source
Replicator.scala
Supertypes
trait Product
trait Equals
trait Serializable
class GetResponse[A]
class Object
trait Matchable
class Any
Show all
final case class ModifyFailure[A <: ReplicatedData](key: Key[A], errorMessage: String, cause: Throwable, request: Option[Any]) extends UpdateFailure[A]

If the modify function of the Update throws an exception the reply message will be this ModifyFailure message. The original exception is included as cause.

If the modify function of the Update throws an exception the reply message will be this ModifyFailure message. The original exception is included as cause.

Attributes

Source
Replicator.scala
Supertypes
trait Serializable
trait Product
trait Equals
class UpdateFailure[A]
class UpdateResponse[A]
class Object
trait Matchable
class Any
Show all
final case class NotFound[A <: ReplicatedData](key: Key[A], request: Option[Any]) extends GetResponse[A], ReplicatorMessage

Attributes

Source
Replicator.scala
Supertypes
trait Product
trait Equals
trait Serializable
class GetResponse[A]
class Object
trait Matchable
class Any
Show all
final case class ReadAll(timeout: FiniteDuration) extends ReadConsistency

Attributes

Source
Replicator.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
sealed trait ReadConsistency

Attributes

Source
Replicator.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class ReadAll
class ReadFrom
object ReadLocal.type
class ReadMajority
final case class ReadFrom(n: Int, timeout: FiniteDuration) extends ReadConsistency

Attributes

Source
Replicator.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
case object ReadLocal extends ReadConsistency

Attributes

Source
Replicator.scala
Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
Self type
ReadLocal.type
final case class ReadMajority(timeout: FiniteDuration, minCap: Int) extends ReadConsistency

Attributes

Source
Replicator.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
final case class ReadMajorityPlus(timeout: FiniteDuration, additional: Int, minCap: Int) extends ReadConsistency

ReadMajority but with the given number of additional nodes added to the majority count. At most all nodes. Exiting nodes are excluded using ReadMajorityPlus because those are typically about to be removed and will not be able to respond.

ReadMajority but with the given number of additional nodes added to the majority count. At most all nodes. Exiting nodes are excluded using ReadMajorityPlus because those are typically about to be removed and will not be able to respond.

Attributes

Source
Replicator.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
final case class ReplicaCount(n: Int)

Current number of replicas. Reply to GetReplicaCount.

Current number of replicas. Reply to GetReplicaCount.

Attributes

Source
Replicator.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
final case class ReplicationDeleteFailure[A <: ReplicatedData](key: Key[A], request: Option[Any]) extends DeleteResponse[A]

Attributes

Source
Replicator.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait DeleteResponse[A]
class Object
trait Matchable
class Any
Show all

Marker trait for remote messages serialized by pekko.cluster.ddata.protobuf.ReplicatorMessageSerializer.

Marker trait for remote messages serialized by pekko.cluster.ddata.protobuf.ReplicatorMessageSerializer.

Attributes

Source
Replicator.scala
Supertypes
trait Serializable
class Object
trait Matchable
class Any
Known subtypes
class Changed[A]
class Get[A]
class GetFailure[A]
class GetSuccess[A]
class NotFound[A]
class Subscribe[A]
class Unsubscribe[A]
Show all
final case class StoreFailure[A <: ReplicatedData](key: Key[A], request: Option[Any]) extends UpdateFailure[A], DeleteResponse[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. This is only used for entries that have been configured to be durable.

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.

Attributes

Source
Replicator.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait DeleteResponse[A]
class UpdateFailure[A]
class UpdateResponse[A]
class Object
trait Matchable
class Any
Show all
final case class Subscribe[A <: ReplicatedData](key: Key[A], subscriber: ActorRef) extends ReplicatorMessage

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.

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 explicit FlushChanges message to the Replicator 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.

Attributes

Source
Replicator.scala
Supertypes
trait Product
trait Equals
trait Serializable
class Object
trait Matchable
class Any
Show all

Attributes

See also
Source
Replicator.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class Changed[A]
class Deleted[A]
final case class Unsubscribe[A <: ReplicatedData](key: Key[A], subscriber: ActorRef) extends ReplicatorMessage

Unregister a subscriber.

Unregister a subscriber.

Attributes

See also
Source
Replicator.scala
Supertypes
trait Product
trait Equals
trait Serializable
class Object
trait Matchable
class Any
Show all
final case class Update[A <: ReplicatedData](key: Key[A], writeConsistency: WriteConsistency, request: Option[Any])(modify: Option[A] => A) extends Command[A], NoSerializationVerificationNeeded

Send this message to the local Replicator to update a data value for the given key. The Replicator will reply with one of the UpdateResponse messages.

Send this message to the local Replicator to update a data value for the given key. The Replicator 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 the modify function. It is None if there is no value for the key, and otherwise Some(data). The function is supposed to return the new value of the data, which will then be replicated according to the given writeConsistency.

The modify function is called by the Replicator 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 access sender() reference of an enclosing actor.

Attributes

Companion
object
Source
Replicator.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait Command[A]
class Object
trait Matchable
class Any
Show all
object Update

Attributes

Companion
class
Source
Replicator.scala
Supertypes
class Object
trait Matchable
class Any
Self type
Update.type
final case class UpdateDataDeleted[A <: ReplicatedData](key: Key[A], request: Option[Any]) extends UpdateResponse[A]

The Update couldn't be performed because the entry has been deleted.

The Update couldn't be performed because the entry has been deleted.

Attributes

Source
Replicator.scala
Supertypes
trait Serializable
trait Product
trait Equals
class UpdateResponse[A]
class Object
trait Matchable
class Any
Show all
sealed abstract class UpdateFailure[A <: ReplicatedData] extends UpdateResponse[A]

Attributes

Source
Replicator.scala
Supertypes
class UpdateResponse[A]
class Object
trait Matchable
class Any
Known subtypes
class ModifyFailure[A]
class StoreFailure[A]
class UpdateTimeout[A]

Attributes

Source
Replicator.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class UpdateFailure[A]
class ModifyFailure[A]
class StoreFailure[A]
class UpdateTimeout[A]
class UpdateSuccess[A]
Show all
final case class UpdateSuccess[A <: ReplicatedData](key: Key[A], request: Option[Any]) extends UpdateResponse[A], DeadLetterSuppression

Attributes

Source
Replicator.scala
Supertypes
trait Serializable
trait Product
trait Equals
class UpdateResponse[A]
class Object
trait Matchable
class Any
Show all
final case class UpdateTimeout[A <: ReplicatedData](key: Key[A], request: Option[Any]) extends UpdateFailure[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.

Attributes

Source
Replicator.scala
Supertypes
trait Serializable
trait Product
trait Equals
class UpdateFailure[A]
class UpdateResponse[A]
class Object
trait Matchable
class Any
Show all
final case class WriteAll(timeout: FiniteDuration) extends WriteConsistency

Attributes

Source
Replicator.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
sealed trait WriteConsistency

Attributes

Source
Replicator.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class WriteAll
object WriteLocal.type
class WriteTo
case object WriteLocal extends WriteConsistency

Attributes

Source
Replicator.scala
Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
Self type
WriteLocal.type
final case class WriteMajority(timeout: FiniteDuration, minCap: Int) extends WriteConsistency

Attributes

Source
Replicator.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
final case class WriteMajorityPlus(timeout: FiniteDuration, additional: Int, minCap: Int) extends WriteConsistency

WriteMajority but with the given number of additional nodes added to the majority count. At most all nodes. Exiting nodes are excluded using WriteMajorityPlus because those are typically about to be removed and will not be able to respond.

WriteMajority but with the given number of additional nodes added to the majority count. At most all nodes. Exiting nodes are excluded using WriteMajorityPlus because those are typically about to be removed and will not be able to respond.

Attributes

Source
Replicator.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
final case class WriteTo(n: Int, timeout: FiniteDuration) extends WriteConsistency

Attributes

Source
Replicator.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Value members

Concrete methods

Java API: The FlushChanges instance

Java API: The FlushChanges instance

Attributes

Source
Replicator.scala

Java API: The GetReplicaCount instance

Java API: The GetReplicaCount instance

Attributes

Source
Replicator.scala
def props(settings: ReplicatorSettings): Props

Factory method for the pekko.actor.Props of the Replicator actor.

Factory method for the pekko.actor.Props of the Replicator actor.

Attributes

Source
Replicator.scala
def readLocal: ReadLocal.type

Java API: The ReadLocal instance

Java API: The ReadLocal instance

Attributes

Source
Replicator.scala

Java API: The WriteLocal instance

Java API: The WriteLocal instance

Attributes

Source
Replicator.scala

Concrete fields

Attributes

Source
Replicator.scala