- 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 void
Called afterTransactionProvider.begin(TransactionContext)
.default void
Called beforeTransactionProvider.begin(TransactionContext)
.default void
Called afterTransactionProvider.commit(TransactionContext)
.default void
Called beforeTransactionProvider.commit(TransactionContext)
.static CallbackTransactionListener
onBeginEnd
(Consumer<? super TransactionContext> onBeginEnd) Create aTransactionListener
with aonBeginEnd(Consumer)
implementation.static CallbackTransactionListener
onBeginStart
(Consumer<? super TransactionContext> onBeginStart) Create aTransactionListener
with aonBeginStart(Consumer)
implementation.static CallbackTransactionListener
onCommitEnd
(Consumer<? super TransactionContext> onCommitEnd) Create aTransactionListener
with aonCommitEnd(Consumer)
implementation.static CallbackTransactionListener
onCommitStart
(Consumer<? super TransactionContext> onCommitStart) Create aTransactionListener
with aonCommitStart(Consumer)
implementation.static CallbackTransactionListener
onRollbackEnd
(Consumer<? super TransactionContext> onRollbackEnd) Create aTransactionListener
with aonRollbackEnd(Consumer)
implementation.static CallbackTransactionListener
onRollbackStart
(Consumer<? super TransactionContext> onRollbackStart) Create aTransactionListener
with aonRollbackStart(Consumer)
implementation.default void
Called afterTransactionProvider.rollback(TransactionContext)
.default void
Called 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 aTransactionListener
with aonBeginStart(Consumer)
implementation. -
onBeginEnd
Create aTransactionListener
with aonBeginEnd(Consumer)
implementation. -
onCommitStart
static CallbackTransactionListener onCommitStart(Consumer<? super TransactionContext> onCommitStart) Create aTransactionListener
with aonCommitStart(Consumer)
implementation. -
onCommitEnd
Create aTransactionListener
with aonCommitEnd(Consumer)
implementation. -
onRollbackStart
static CallbackTransactionListener onRollbackStart(Consumer<? super TransactionContext> onRollbackStart) Create aTransactionListener
with aonRollbackStart(Consumer)
implementation. -
onRollbackEnd
static CallbackTransactionListener onRollbackEnd(Consumer<? super TransactionContext> onRollbackEnd) Create aTransactionListener
with aonRollbackEnd(Consumer)
implementation.
-