Class EntityContext<M>
java.lang.Object
org.apache.pekko.cluster.sharding.typed.scaladsl.EntityContext<M>
Parameter to
createBehavior function in Entity.apply.
Cluster Sharding is often used together with pekko.persistence.typed.scaladsl.EventSourcedBehavior
for the entities. See more considerations in pekko.persistence.typed.PersistenceId.
The PersistenceId of the EventSourcedBehavior can typically be constructed with:
PersistenceId(entityContext.entityTypeKey.name, entityContext.entityId)
param: entityTypeKey the key of the entity type param: entityId the business domain identifier of the entity
-
Constructor Summary
ConstructorsConstructorDescriptionEntityContext(EntityTypeKey<M> entityTypeKey, String entityId, ActorRef<ClusterSharding.ShardCommand> shard) -
Method Summary
-
Constructor Details
-
EntityContext
public EntityContext(EntityTypeKey<M> entityTypeKey, String entityId, ActorRef<ClusterSharding.ShardCommand> shard)
-
-
Method Details
-
entityId
-
entityTypeKey
-
shard
-