Package io.micronaut.transaction.support
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,MongoSynchronousTransactionManager
@Internal public interface TransactionStateOperations<T,S extends TransactionState>Generic transaction state operations interface.- Since:
- 3.4.0
- Author:
- graemerocher, Denis Stepanov
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <R> Rexecute(S state, TransactionDefinition definition, TransactionCallback<T,R> callback)Execute a read-only transaction within the context of the function.<R> RexecuteRead(S state, TransactionCallback<T,R> callback)Execute a read-only transaction within the context of the function.<R> RexecuteWrite(S state, TransactionCallback<T,R> callback)Execute a default transaction within the context of the function.
-
-
-
Method Detail
-
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 statedefinition- The transaction definitioncallback- 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 statecallback- 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 statecallback- The call back- Returns:
- The result
-
-