Class Entity$
- java.lang.Object
-
- org.apache.pekko.cluster.sharding.typed.scaladsl.Entity$
-
public class Entity$ extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description Entity$()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <M> Entity<M,ShardingEnvelope<M>>
apply(EntityTypeKey<M> typeKey, scala.Function1<EntityContext<M>,Behavior<M>> createBehavior)
Defines how the entity should be created.
-
-
-
Field Detail
-
MODULE$
public static final Entity$ MODULE$
Static reference to the singleton instance of this Scala object.
-
-
Method Detail
-
apply
public <M> Entity<M,ShardingEnvelope<M>> apply(EntityTypeKey<M> typeKey, scala.Function1<EntityContext<M>,Behavior<M>> createBehavior)
Defines how the entity should be created. Used inClusterSharding.init(org.apache.pekko.cluster.sharding.typed.scaladsl.Entity<M, E>)
. More optional settings can be defined using thewith
methods 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)
-
-