Class SynchronousConnectionOperationsFromReactiveConnectionOperations<T>
java.lang.Object
io.micronaut.data.connection.sync.SynchronousConnectionOperationsFromReactiveConnectionOperations<T>
- Type Parameters:
T
- The connection type
- All Implemented Interfaces:
ConnectionOperations<T>
@Internal
public final class SynchronousConnectionOperationsFromReactiveConnectionOperations<T>
extends Object
implements ConnectionOperations<T>
Implementation of the synchronous connection operations using a reactive connection operations.
- Since:
- 4.0.0
- Author:
- Denis Stepanov
-
Constructor Summary
ConstructorDescriptionSynchronousConnectionOperationsFromReactiveConnectionOperations
(ReactorConnectionOperations<T> reactorConnectionOperations, ExecutorService blockingExecutorService) -
Method Summary
Modifier and TypeMethodDescription<R> R
execute
(ConnectionDefinition definition, Function<ConnectionStatus<T>, R> callback) Execute a connection within the context of the function.Obtains the current 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.ConnectionOperations
executeRead, executeWrite, getConnectionStatus
-
Constructor Details
-
SynchronousConnectionOperationsFromReactiveConnectionOperations
public SynchronousConnectionOperationsFromReactiveConnectionOperations(ReactorConnectionOperations<T> reactorConnectionOperations, ExecutorService blockingExecutorService)
-
-
Method Details
-
findConnectionStatus
Description copied from interface:ConnectionOperations
Obtains the current connection.- Specified by:
findConnectionStatus
in interfaceConnectionOperations<T>
- Returns:
- The optional connection
-
execute
Description copied from interface:ConnectionOperations
Execute a connection within the context of the function.- Specified by:
execute
in interfaceConnectionOperations<T>
- Type Parameters:
R
- The result- Parameters:
definition
- The connection definitioncallback
- The call back- Returns:
- The result
-