Package io.quarkus.narayana.jta
Interface TransactionRunner
-
- All Known Subinterfaces:
TransactionRunnerOptions
- All Known Implementing Classes:
TransactionRunnerImpl
public interface TransactionRunnerRuns tasks in transactions with pre-defined semantics and options.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <T> Tcall(Callable<T> task)Calls the given callable, starting/suspending transactions as required by the selectedsemantics.voidrun(Runnable task)Runs the given runnable, starting/suspending transactions as required by the selectedsemantics.
-
-
-
Method Detail
-
run
void run(Runnable task)
Runs the given runnable, starting/suspending transactions as required by the selectedsemantics.- Parameters:
task- A task to run with the selected transaction semantics.
-
call
<T> T call(Callable<T> task)
Calls the given callable, starting/suspending transactions as required by the selectedsemantics.If the task throws a checked exception it will be wrapped with a
QuarkusTransactionException- Parameters:
task- A task to run with the selected transaction semantics.- Returns:
- The value returned by
task.call(). - Throws:
QuarkusTransactionException- If the task throws a checked exception.
-
-