|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface UnitOfWorkListener
Interface describing a listener that is notified of state changes in the UnitOfWork it has been registered with.
| Method Summary | |
|---|---|
void |
afterCommit()
Invoked when the UnitOfWork is committed. |
void |
onCleanup()
Notifies listeners that the UnitOfWork is being cleaned up. |
void |
onPrepareCommit(Set<AggregateRoot> aggregateRoots,
List<Event> events)
Invoked before aggregates are committed, and before any events are published. |
void |
onRollback(Throwable failureCause)
Invoked when the UnitOfWork is rolled back. |
| Method Detail |
|---|
void afterCommit()
onRollback(Throwable) consecutively.
UnitOfWork.commit()void onRollback(Throwable failureCause)
failureCause - The exception (or error) causing the roll backUnitOfWork.rollback(Throwable)
void onPrepareCommit(Set<AggregateRoot> aggregateRoots,
List<Event> events)
events may not contain the uncommitted domain events of each of the
aggregateRoots. To retrieve all events, collect all uncommitted events from the aggregate roots and
combine them with the list of events.
aggregateRoots - the aggregate roots being committedevents - Events that have been registered for dispatching with the UnitOfWorkvoid onCleanup()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||