Interface UnitOfWorkLifecycleCallback<RESOURCE_TYPE>
public interface UnitOfWorkLifecycleCallback<RESOURCE_TYPE>
Callback that can be registered with a
UnitOfWork in relation to
one of more Resources (can e.g. be an Aggregate). When the UnitOfWork is committed
or rolledback the UnitOfWorkLifecycleCallback will be called with all the Resources that have been associated with it through
the UnitOfWork-
Method Summary
Modifier and TypeMethodDescriptionvoidafterCommit(UnitOfWork unitOfWork, List<RESOURCE_TYPE> associatedResources) voidafterRollback(UnitOfWork unitOfWork, List<RESOURCE_TYPE> associatedResources, Exception causeOfTheRollback) voidbeforeCommit(UnitOfWork unitOfWork, List<RESOURCE_TYPE> associatedResources) voidbeforeRollback(UnitOfWork unitOfWork, List<RESOURCE_TYPE> associatedResources, Exception causeOfTheRollback)
-
Method Details
-
beforeCommit
-
afterCommit
-
beforeRollback
void beforeRollback(UnitOfWork unitOfWork, List<RESOURCE_TYPE> associatedResources, Exception causeOfTheRollback) -
afterRollback
void afterRollback(UnitOfWork unitOfWork, List<RESOURCE_TYPE> associatedResources, Exception causeOfTheRollback)
-