Class ReplicatedEntity<M>
java.lang.Object
org.apache.pekko.cluster.sharding.typed.ReplicatedEntity<M>
Settings for a specific replica id in replicated sharding
Currently only Entity's with ShardingEnvelope are supported but this may change in the future
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <M> ReplicatedEntity<M>apply(ReplicaId replicaId, Entity<M, ShardingEnvelope<M>> entity) Scala API: Defines thepekko.cluster.sharding.typed.scaladsl.Entityto use for a given replica, note that the behavior can be a behavior created withpekko.persistence.typed.scaladsl.ReplicatedEventSourcingor an arbitrary non persistentpekko.actor.typed.Behaviorbut must never be a regularpekko.persistence.typed.scaladsl.EventSourcedBehavioras that requires a single writer and that would cause it to have multiple writers.static <M> ReplicatedEntity<M>create(ReplicaId replicaId, Entity<M, ShardingEnvelope<M>> entity) Java API: Defines thepekko.cluster.sharding.typed.javadsl.Entityto use for a given replica, note that the behavior can be apekko.persistence.typed.javadsl.ReplicatedEventSourcedBehavioror an arbitrary non persistentpekko.actor.typed.Behaviorbut must never be a regularpekko.persistence.typed.javadsl.EventSourcedBehavioras that requires a single writer and that would cause it to have multiple writers.entity()
-
Constructor Details
-
ReplicatedEntity
public ReplicatedEntity()
-
-
Method Details
-
create
public static <M> ReplicatedEntity<M> create(ReplicaId replicaId, Entity<M, ShardingEnvelope<M>> entity) Java API: Defines thepekko.cluster.sharding.typed.javadsl.Entityto use for a given replica, note that the behavior can be apekko.persistence.typed.javadsl.ReplicatedEventSourcedBehavioror an arbitrary non persistentpekko.actor.typed.Behaviorbut must never be a regularpekko.persistence.typed.javadsl.EventSourcedBehavioras that requires a single writer and that would cause it to have multiple writers. -
apply
public static <M> ReplicatedEntity<M> apply(ReplicaId replicaId, Entity<M, ShardingEnvelope<M>> entity) Scala API: Defines thepekko.cluster.sharding.typed.scaladsl.Entityto use for a given replica, note that the behavior can be a behavior created withpekko.persistence.typed.scaladsl.ReplicatedEventSourcingor an arbitrary non persistentpekko.actor.typed.Behaviorbut must never be a regularpekko.persistence.typed.scaladsl.EventSourcedBehavioras that requires a single writer and that would cause it to have multiple writers. -
replicaId
-
entity
-