Interface TransactionStateOperations<T,S extends TransactionState>

Type Parameters:
T - The resource type, such as the connection.
S - The transaction state type
All Known Implementing Classes:
AbstractSynchronousStateTransactionManager, AbstractSynchronousTransactionManager, DataSourceTransactionManager, HibernateTransactionManager, MongoSynchronousTransactionManagerImpl

@Internal public interface TransactionStateOperations<T,S extends TransactionState>
Generic transaction state operations interface.
Since:
3.4.0
Author:
graemerocher, Denis Stepanov
  • Method Details

    • execute

      <R> R execute(@NonNull S state, @NonNull TransactionDefinition definition, @NonNull TransactionCallback<T,R> callback)
      Execute a read-only transaction within the context of the function.
      Type Parameters:
      R - The result
      Parameters:
      state - The transaction state
      definition - The transaction definition
      callback - The call back
      Returns:
      The result
    • executeRead

      <R> R executeRead(@NonNull S state, @NonNull TransactionCallback<T,R> callback)
      Execute a read-only transaction within the context of the function.
      Type Parameters:
      R - The result
      Parameters:
      state - The transaction state
      callback - The call back
      Returns:
      The result
    • executeWrite

      <R> R executeWrite(@NonNull S state, @NonNull TransactionCallback<T,R> callback)
      Execute a default transaction within the context of the function.
      Type Parameters:
      R - The result
      Parameters:
      state - The transaction state
      callback - The call back
      Returns:
      The result