Interface TransactionRunner

All Known Subinterfaces:
TransactionRunnerOptions
All Known Implementing Classes:
TransactionRunnerImpl

public interface TransactionRunner
Runs tasks in transactions with pre-defined semantics and options.
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    <T> T
    call(Callable<T> task)
    Calls the given callable, starting/suspending transactions as required by the selected semantics.
    void
    run(Runnable task)
    Runs the given runnable, starting/suspending transactions as required by the selected semantics.
  • Method Details

    • run

      void run(Runnable task)
      Runs the given runnable, starting/suspending transactions as required by the selected semantics.
      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 selected semantics.

      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.