Class EventSourcedEntity$
- java.lang.Object
-
- akka.cluster.sharding.typed.scaladsl.EventSourcedEntity$
-
public class EventSourcedEntity$ extends java.lang.Object
Create aBehavior
for a persistent actor that is used with Cluster Sharding.Any
Behavior
can be used as a sharded entity actor, but the combination of sharding and persistent actors is very common and therefore thisPersistentEntity
is provided as convenience.It is a
EventSourcedBehavior
and is implemented in the same way. It selects thepersistenceId
automatically from theEntityTypeKey
andentityId
constructor parameters by usingEntityTypeKey.persistenceIdFrom
.
-
-
Field Summary
Fields Modifier and Type Field Description static EventSourcedEntity$
MODULE$
Static reference to the singleton instance of this Scala object.
-
Constructor Summary
Constructors Constructor Description EventSourcedEntity$()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <Command,Event,State>
EventSourcedBehavior<Command,Event,State>apply(EntityTypeKey<Command> entityTypeKey, java.lang.String entityId, State emptyState, scala.Function2<State,Command,Effect<Event,State>> commandHandler, scala.Function2<State,Event,State> eventHandler)
-
-
-
Field Detail
-
MODULE$
public static final EventSourcedEntity$ MODULE$
Static reference to the singleton instance of this Scala object.
-
-
Method Detail
-
apply
public <Command,Event,State> EventSourcedBehavior<Command,Event,State> apply(EntityTypeKey<Command> entityTypeKey, java.lang.String entityId, State emptyState, scala.Function2<State,Command,Effect<Event,State>> commandHandler, scala.Function2<State,Event,State> eventHandler)
-
-