state of Aggregate Root
This method should be used as a callback handler for persist() method.
This method should be used as a callback handler for persist() method. It will: - apply the event on the aggregate effectively changing its state - check if a snapshot needs to be saved.
DomainEvent that has been persisted
Apply event on the AggregateRoot.
Specifies how many events should be processed before new snapshot is taken.
Specifies how many events should be processed before new snapshot is taken. TODO: make configurable
Recovery handler that receives persisted events during recovery.
Recovery handler that receives persisted events during recovery. If a state snapshot has been captured and saved, this handler will receive a SnapshotOffer message followed by events that are younger than the offered snapshot.
This handler must not have side-effects other than changing persistent actor state i.e. it should not perform actions that may fail, such as interacting with external services, for example.
restore the lifecycle and state of the aggregate from a snapshot
restore the lifecycle and state of the aggregate from a snapshot
snapshot metadata
the aggregate
send a message containing the aggregate's state back to the requester
send a message containing the aggregate's state back to the requester
actor to send message to
(Since version 2.4) use persistAll instead
(Since version 2.4) use persistAllAsync instead