Class AggregateDomainEvent
DomainEvent which should be used when there is an action to be applied on a single aggregate root.
When NGS\Patterns\DomainEvent
affects only a single aggregate, then we can use
specialized aggregate domain event. This event can't have side effects outside
aggregate, which allows it to be replayed when it's asynchronous. This is useful
in write intensive scenarios to minimize write load in the database, but will
increase read load, because reading aggregate will have to read all it's
unapplied events and apply them during reconstruction.
AggregateDomainEvent is defined in DSL with keyword event.
module Todo { aggregate Task; event<Task> MarkDone; }
public
|