com.lightbend.lagom.scaladsl.persistence.PersistentEntity
Extends State => Actions so that it can be used directly in
PersistentEntity#behavior when there is only one set of actions
independent of state.
Extends State => Actions so that it can be used directly in
PersistentEntity#behavior when there is only one set of actions
independent of state.
Add a command handler.
Add a command handler. For each command class the handler is a
PartialFunction. Adding a handler for a command class that was
previously defined will replace the previous handler for that class.
It is possible to combine handlers from two different Actions with
#orElse method.
Add an event handler.
Add an event handler. Each handler is a PartialFunction and they
will be tried in the order they were added, i.e. they are combined
with orElse.
Add a command handler that will not persist any events.
Add a command handler that will not persist any events. This is a convenience
method to #onCommand. For each command class the handler is a
PartialFunction. Adding a handler for a command class that was
previously defined will replace the previous handler for that class.
It is possible to combine handlers from two different Actions with
#orElse method.
Append eventHandler and commandHandlers from b to the handlers
of this Actions.
Append eventHandler and commandHandlers from b to the handlers
of this Actions.
Event handlers are combined with orElse of the partial functions.
Command handlers for a specific command class that are defined in
both b and this Actions will be combined with orElse of the
partial functions.
Actions consists of functions to process incoming commands and persisted events.
Actionsis an immutable class.