Class AsyncUsingReactiveConnectionOperations<C>
java.lang.Object
io.micronaut.data.connection.async.AsyncUsingReactiveConnectionOperations<C>
- Type Parameters:
C- The connection type
- All Implemented Interfaces:
AsyncConnectionOperations<C>
@Internal
public final class AsyncUsingReactiveConnectionOperations<C>
extends Object
implements AsyncConnectionOperations<C>
Implementation of the asynchronous connection operations using a reactive connection operations.
- Since:
- 4.0.0
- Author:
- Denis Stepanov
-
Constructor Summary
ConstructorsConstructorDescriptionAsyncUsingReactiveConnectionOperations(ReactorConnectionOperations<C> reactorConnectionOperations) -
Method Summary
Modifier and TypeMethodDescriptionObtains the current connection.<T> CompletionStage<T>withConnection(ConnectionDefinition definition, Function<ConnectionStatus<C>, CompletionStage<T>> handler) Execute the given handler with a new connection.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.micronaut.data.connection.async.AsyncConnectionOperations
getConnectionStatus, withConnection
-
Constructor Details
-
AsyncUsingReactiveConnectionOperations
public AsyncUsingReactiveConnectionOperations(ReactorConnectionOperations<C> reactorConnectionOperations)
-
-
Method Details
-
findConnectionStatus
Description copied from interface:AsyncConnectionOperationsObtains the current connection.- Specified by:
findConnectionStatusin interfaceAsyncConnectionOperations<C>- Returns:
- The optional connection
-
withConnection
public <T> CompletionStage<T> withConnection(ConnectionDefinition definition, Function<ConnectionStatus<C>, CompletionStage<T>> handler) Description copied from interface:AsyncConnectionOperationsExecute the given handler with a new connection.- Specified by:
withConnectionin interfaceAsyncConnectionOperations<C>- Type Parameters:
T- The emitted type- Parameters:
definition- The definitionhandler- The handler- Returns:
- A publisher that emits the result type
-