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 SummaryConstructorsConstructorDescriptionAsyncUsingSyncTransactionOperations(SynchronousTransactionManager<C> synchronousTransactionManager) 
- 
Method SummaryModifier 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.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.micronaut.transaction.async.AsyncTransactionOperationsfindTransactionStatus, withTransaction
- 
Constructor Details- 
AsyncUsingSyncTransactionOperationspublic AsyncUsingSyncTransactionOperations(SynchronousTransactionManager<C> synchronousTransactionManager) 
 
- 
- 
Method Details- 
withTransactionpublic <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 interface- AsyncTransactionOperations<C>
- Type Parameters:
- T- The emitted type
- Parameters:
- definition- The definition
- handler- The handler
- Returns:
- A publisher that emits the result type
 
 
-