The Aggregate type.
The Aggregate type. This is the only (abstract) type member to be defined.
All other type members are aliases defined by type projection of inner types from Aggregate type itself.
Alias for Aggregate's ProtocolCommand
Alias for Aggregate's ProtocolCommand
Alias for Aggregate's ProtocolEvent
Alias for Aggregate's ProtocolEvent
Alias for an immutable Seq of Aggregate's ProtocolEvent
Alias for an immutable Seq of Aggregate's ProtocolEvent
Alias for Aggregate#Id
Alias for Aggregate#Id
Alias for Aggregate#Protocol
Alias for Aggregate#Protocol
Natural transformation from Try to a F
Natural transformation from Try to a F
In the occurrence of missing behavior, we have no other choice than emitting a MissingBehaviorException. This is wrapped in a Try that must be transformed to the correct error type for F[_]
- the produced events
The interpret PartialFunction is specific to each interpreter.
The interpret PartialFunction is specific to each interpreter. It's responsible for executing the command and lifting the output to F[_]
// example of interpret for an AsyncInterpreter def interpret: InterpreterFunction = { case (cmd, IdCommandHandlerInvoker(handler)) => Future.successful(handler(cmd)) case (cmd, TryCommandHandlerInvoker(handler)) => Future.fromTry(handler(cmd)) case (cmd, FutureCommandHandlerInvoker(handler)) => handler(cmd) }
Apply all 'evt' on passed 'state'.
Apply all 'evt' on passed 'state'.
- the aggregate current state
- event to be applied
new aggregate state after applying event
MissingEventHandlerException
if no Event handler is defined for the passed event.
Apply all 'evts' on passed 'state'.
Apply all 'evts' on passed 'state'.
- the aggregate current state
- events to be applied
new aggregate state after applying all events
MissingEventHandlerException
if no Event handler is defined for one of the passed events.
Base Interpreter trait.
Implementors must define which type F must be bound to.