java.lang.Object
org.jooq.impl.CallbackTransactionListener
- All Implemented Interfaces:
TransactionListener
A
TransactionListener
that allows for functional composition.
For example:
TransactionListener listener = TransactionListener
.onCommitStart(ctx -> something())
.onCommitEnd(ctx -> something());
- Author:
- Lukas Eder
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfinal void
Called afterTransactionProvider.begin(TransactionContext)
.final void
Called beforeTransactionProvider.begin(TransactionContext)
.final void
Called afterTransactionProvider.commit(TransactionContext)
.final void
Called beforeTransactionProvider.commit(TransactionContext)
.onBeginEnd
(Consumer<? super TransactionContext> newOnBeginEnd) onBeginStart
(Consumer<? super TransactionContext> newOnBeginStart) onCommitEnd
(Consumer<? super TransactionContext> newOnCommitEnd) onCommitStart
(Consumer<? super TransactionContext> newOnCommitStart) onRollbackEnd
(Consumer<? super TransactionContext> newOnRollbackEnd) onRollbackStart
(Consumer<? super TransactionContext> newOnRollbackStart) final void
Called afterTransactionProvider.rollback(TransactionContext)
.final void
Called beforeTransactionProvider.rollback(TransactionContext)
.
-
Constructor Details
-
CallbackTransactionListener
public CallbackTransactionListener()
-
-
Method Details
-
beginStart
Description copied from interface:TransactionListener
Called beforeTransactionProvider.begin(TransactionContext)
.- Specified by:
beginStart
in interfaceTransactionListener
-
beginEnd
Description copied from interface:TransactionListener
Called afterTransactionProvider.begin(TransactionContext)
.- Specified by:
beginEnd
in interfaceTransactionListener
-
commitStart
Description copied from interface:TransactionListener
Called beforeTransactionProvider.commit(TransactionContext)
.- Specified by:
commitStart
in interfaceTransactionListener
-
commitEnd
Description copied from interface:TransactionListener
Called afterTransactionProvider.commit(TransactionContext)
.- Specified by:
commitEnd
in interfaceTransactionListener
-
rollbackStart
Description copied from interface:TransactionListener
Called beforeTransactionProvider.rollback(TransactionContext)
.- Specified by:
rollbackStart
in interfaceTransactionListener
-
rollbackEnd
Description copied from interface:TransactionListener
Called afterTransactionProvider.rollback(TransactionContext)
.- Specified by:
rollbackEnd
in interfaceTransactionListener
-
onBeginStart
public final CallbackTransactionListener onBeginStart(Consumer<? super TransactionContext> newOnBeginStart) -
onBeginEnd
public final CallbackTransactionListener onBeginEnd(Consumer<? super TransactionContext> newOnBeginEnd) -
onCommitStart
public final CallbackTransactionListener onCommitStart(Consumer<? super TransactionContext> newOnCommitStart) -
onCommitEnd
public final CallbackTransactionListener onCommitEnd(Consumer<? super TransactionContext> newOnCommitEnd) -
onRollbackStart
public final CallbackTransactionListener onRollbackStart(Consumer<? super TransactionContext> newOnRollbackStart) -
onRollbackEnd
public final CallbackTransactionListener onRollbackEnd(Consumer<? super TransactionContext> newOnRollbackEnd)
-