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
ConstructorDescriptionAsyncUsingReactiveConnectionOperations
(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, wait
Methods 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:AsyncConnectionOperations
Obtains the current connection.- Specified by:
findConnectionStatus
in interfaceAsyncConnectionOperations<C>
- Returns:
- The optional connection
-
withConnection
public <T> CompletionStage<T> withConnection(ConnectionDefinition definition, Function<ConnectionStatus<C>, CompletionStage<T>> handler) Description copied from interface:AsyncConnectionOperations
Execute the given handler with a new connection.- Specified by:
withConnection
in interfaceAsyncConnectionOperations<C>
- Type Parameters:
T
- The emitted type- Parameters:
definition
- The definitionhandler
- The handler- Returns:
- A publisher that emits the result type
-