Interface TransactionCallback<T, R extends @Nullable Object>

Type Parameters:
T - The connection type
R - The return type
All Superinterfaces:
Function<TransactionStatus<T>, R>
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface TransactionCallback<T, R extends @Nullable Object> extends Function<TransactionStatus<T>, R>
A functional interface for running code that runs within the context of a transaction.
Author:
graemerocher
  • Method Details

    • apply

      default R apply(TransactionStatus<T> status)
      Specified by:
      apply in interface Function<T, R extends @Nullable Object>
    • call

      R call(TransactionStatus<T> status) throws Exception
      Code that runs within the context of a transaction will implement this method.
      Parameters:
      status - The transaction status.
      Returns:
      The return value
      Throws:
      Exception - When an error occurs in invoking the transaction