Package io.micronaut.transaction.async
Class AsyncUsingReactiveTransactionOperations<C>
java.lang.Object
io.micronaut.transaction.async.AsyncUsingReactiveTransactionOperations<C>
- Type Parameters:
C
- The connection type
- All Implemented Interfaces:
AsyncTransactionOperations<C>
@Internal
public final class AsyncUsingReactiveTransactionOperations<C>
extends Object
implements AsyncTransactionOperations<C>
Implementation of the asynchronous transaction manager using a reactive transaction manager.
- Since:
- 3.5.0
- Author:
- Denis Stepanov
-
Constructor Summary
ConstructorDescriptionAsyncUsingReactiveTransactionOperations
(ReactorReactiveTransactionOperations<C> reactiveTransactionOperations) -
Method Summary
Modifier and TypeMethodDescriptionOptional<? extends io.micronaut.transaction.async.AsyncUsingReactiveTransactionOperations.DefaultAsyncTransactionStatus<?>>
Find optional propagated transaction status.<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, wait
Methods inherited from interface io.micronaut.transaction.async.AsyncTransactionOperations
withTransaction
-
Constructor Details
-
AsyncUsingReactiveTransactionOperations
public AsyncUsingReactiveTransactionOperations(ReactorReactiveTransactionOperations<C> reactiveTransactionOperations)
-
-
Method Details
-
findTransactionStatus
public Optional<? extends io.micronaut.transaction.async.AsyncUsingReactiveTransactionOperations.DefaultAsyncTransactionStatus<?>> findTransactionStatus()Description copied from interface:AsyncTransactionOperations
Find optional propagated transaction status.- Specified by:
findTransactionStatus
in interfaceAsyncTransactionOperations<C>
- Returns:
- The transaction status.
-
withTransaction
public <T> CompletionStage<T> withTransaction(TransactionDefinition definition, Function<AsyncTransactionStatus<C>, CompletionStage<T>> handler) Description copied from interface:AsyncTransactionOperations
Execute the given handler with a new transaction.- Specified by:
withTransaction
in interfaceAsyncTransactionOperations<C>
- Type Parameters:
T
- The emitted type- Parameters:
definition
- The definitionhandler
- The handler- Returns:
- A publisher that emits the result type
-