- All Known Implementing Classes:
CallbackTransactionListener,DefaultTransactionListener
public interface TransactionListener
The
TransactionListener SPI is used to intercept the
TransactionProvider's transaction events.- Author:
- Lukas Eder
-
Method Summary
Modifier and TypeMethodDescriptiondefault voidCalled afterTransactionProvider.begin(TransactionContext).default voidCalled beforeTransactionProvider.begin(TransactionContext).default voidCalled afterTransactionProvider.commit(TransactionContext).default voidCalled beforeTransactionProvider.commit(TransactionContext).static CallbackTransactionListeneronBeginEnd(Consumer<? super TransactionContext> onBeginEnd) Create aTransactionListenerwith aonBeginEnd(Consumer)implementation.static CallbackTransactionListeneronBeginStart(Consumer<? super TransactionContext> onBeginStart) Create aTransactionListenerwith aonBeginStart(Consumer)implementation.static CallbackTransactionListeneronCommitEnd(Consumer<? super TransactionContext> onCommitEnd) Create aTransactionListenerwith aonCommitEnd(Consumer)implementation.static CallbackTransactionListeneronCommitStart(Consumer<? super TransactionContext> onCommitStart) Create aTransactionListenerwith aonCommitStart(Consumer)implementation.static CallbackTransactionListeneronRollbackEnd(Consumer<? super TransactionContext> onRollbackEnd) Create aTransactionListenerwith aonRollbackEnd(Consumer)implementation.static CallbackTransactionListeneronRollbackStart(Consumer<? super TransactionContext> onRollbackStart) Create aTransactionListenerwith aonRollbackStart(Consumer)implementation.default voidCalled afterTransactionProvider.rollback(TransactionContext).default voidCalled beforeTransactionProvider.rollback(TransactionContext).
-
Method Details
-
beginStart
Called beforeTransactionProvider.begin(TransactionContext).- Parameters:
ctx- The context containing information about the transaction.
-
beginEnd
Called afterTransactionProvider.begin(TransactionContext).- Parameters:
ctx- The context containing information about the transaction.
-
commitStart
Called beforeTransactionProvider.commit(TransactionContext).- Parameters:
ctx- The context containing information about the transaction.
-
commitEnd
Called afterTransactionProvider.commit(TransactionContext).- Parameters:
ctx- The context containing information about the transaction.
-
rollbackStart
Called beforeTransactionProvider.rollback(TransactionContext).- Parameters:
ctx- The context containing information about the transaction.
-
rollbackEnd
Called afterTransactionProvider.rollback(TransactionContext).- Parameters:
ctx- The context containing information about the transaction.
-
onBeginStart
Create aTransactionListenerwith aonBeginStart(Consumer)implementation. -
onBeginEnd
Create aTransactionListenerwith aonBeginEnd(Consumer)implementation. -
onCommitStart
static CallbackTransactionListener onCommitStart(Consumer<? super TransactionContext> onCommitStart) Create aTransactionListenerwith aonCommitStart(Consumer)implementation. -
onCommitEnd
Create aTransactionListenerwith aonCommitEnd(Consumer)implementation. -
onRollbackStart
static CallbackTransactionListener onRollbackStart(Consumer<? super TransactionContext> onRollbackStart) Create aTransactionListenerwith aonRollbackStart(Consumer)implementation. -
onRollbackEnd
static CallbackTransactionListener onRollbackEnd(Consumer<? super TransactionContext> onRollbackEnd) Create aTransactionListenerwith aonRollbackEnd(Consumer)implementation.
-