Package io.micronaut.transaction.async
Class AsyncUsingSyncTransactionOperations<C>
java.lang.Object
io.micronaut.transaction.async.AsyncUsingSyncTransactionOperations<C>
- Type Parameters:
 C- The connection type
- All Implemented Interfaces:
 AsyncTransactionOperations<C>
@Internal
public final class AsyncUsingSyncTransactionOperations<C>
extends Object
implements AsyncTransactionOperations<C>
Implementation of the asynchronous transaction manager using a synchronous transaction manager.
- Since:
 - 3.5.0
 - Author:
 - Denis Stepanov
 
- 
Constructor Summary
ConstructorsConstructorDescriptionAsyncUsingSyncTransactionOperations(SynchronousTransactionManager<C> synchronousTransactionManager)  - 
Method Summary
Modifier and TypeMethodDescription<T> CompletionStage<T>withTransaction(TransactionDefinition definition, Function<AsyncTransactionStatus<C>, CompletionStage<T>> handler) Execute the given handler with a new transaction.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.micronaut.transaction.async.AsyncTransactionOperations
findTransactionStatus, withTransaction 
- 
Constructor Details
- 
AsyncUsingSyncTransactionOperations
public AsyncUsingSyncTransactionOperations(SynchronousTransactionManager<C> synchronousTransactionManager)  
 - 
 - 
Method Details
- 
withTransaction
public <T> CompletionStage<T> withTransaction(TransactionDefinition definition, Function<AsyncTransactionStatus<C>, CompletionStage<T>> handler) Description copied from interface:AsyncTransactionOperationsExecute the given handler with a new transaction.- Specified by:
 withTransactionin interfaceAsyncTransactionOperations<C>- Type Parameters:
 T- The emitted type- Parameters:
 definition- The definitionhandler- The handler- Returns:
 - A publisher that emits the result type
 
 
 -