Package akka.cluster.sharding.typed
Class ReplicatedEntity<M>
- java.lang.Object
-
- akka.cluster.sharding.typed.ReplicatedEntity<M>
-
public final class ReplicatedEntity<M> extends java.lang.Object
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 Constructor Description ReplicatedEntity()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <M> ReplicatedEntity<M>
apply(ReplicaId replicaId, Entity<M,ShardingEnvelope<M>> entity)
Scala API: Defines theEntity
to use for a given replica, note that the behavior can be a behavior created withReplicatedEventSourcing
or an arbitrary non persistentBehavior
but must never be a regularEventSourcedBehavior
as 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 theEntity
to use for a given replica, note that the behavior can be aReplicatedEventSourcedBehavior
or an arbitrary non persistentBehavior
but must never be a regularEventSourcedBehavior
as that requires a single writer and that would cause it to have multiple writers.Entity<M,ShardingEnvelope<M>>
entity()
ReplicaId
replicaId()
-
-
-
Method Detail
-
create
public static <M> ReplicatedEntity<M> create(ReplicaId replicaId, Entity<M,ShardingEnvelope<M>> entity)
Java API: Defines theEntity
to use for a given replica, note that the behavior can be aReplicatedEventSourcedBehavior
or an arbitrary non persistentBehavior
but must never be a regularEventSourcedBehavior
as 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 theEntity
to use for a given replica, note that the behavior can be a behavior created withReplicatedEventSourcing
or an arbitrary non persistentBehavior
but must never be a regularEventSourcedBehavior
as that requires a single writer and that would cause it to have multiple writers.
-
replicaId
public ReplicaId replicaId()
-
entity
public Entity<M,ShardingEnvelope<M>> entity()
-
-