Class Entity$
java.lang.Object
org.apache.pekko.cluster.sharding.typed.javadsl.Entity$
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<M> Entity<M,ShardingEnvelope<M>> of(EntityTypeKey<M> typeKey, Function<EntityContext<M>, Behavior<M>> createBehavior) Defines how the entity should be created.
-
Field Details
-
MODULE$
Static reference to the singleton instance of this Scala object.
-
-
Constructor Details
-
Entity$
public Entity$()
-
-
Method Details
-
of
public <M> Entity<M,ShardingEnvelope<M>> of(EntityTypeKey<M> typeKey, Function<EntityContext<M>, Behavior<M>> createBehavior) Defines how the entity should be created. Used inClusterSharding.init(org.apache.pekko.cluster.sharding.typed.javadsl.Entity<M, E>). More optional settings can be defined using thewithmethods of the returnedEntity.- Parameters:
typeKey- A key that uniquely identifies the type of entity in this clustercreateBehavior- Create the behavior for an entity given aEntityContext(includes entityId)
-