Class DefaultReactiveConnectionStatus<C>
java.lang.Object
io.micronaut.data.connection.reactive.DefaultReactiveConnectionStatus<C>
- Type Parameters:
C
- The connection type
- All Implemented Interfaces:
ConnectionStatus<C>
,ReactiveConnectionStatus<C>
@Internal
public final class DefaultReactiveConnectionStatus<C>
extends Object
implements ReactiveConnectionStatus<C>
The default reactive connection status.
- Since:
- 4.2.0
- Author:
- Denis Stepanov
-
Constructor Summary
ConstructorDescriptionDefaultReactiveConnectionStatus
(C connection, ConnectionDefinition definition, boolean isNew) -
Method Summary
Modifier and TypeMethodDescriptionThe connection representation.The connection definition.boolean
isNew()
A new connection value.org.reactivestreams.Publisher<Void>
org.reactivestreams.Publisher<Void>
onComplete
(Supplier<org.reactivestreams.Publisher<Void>> closeConnection) org.reactivestreams.Publisher<Void>
void
registerReactiveSynchronization
(ReactiveConnectionSynchronization synchronization) Register reactive connection synchronization.void
registerSynchronization
(ConnectionSynchronization synchronization) Register connection synchronization.
-
Constructor Details
-
DefaultReactiveConnectionStatus
public DefaultReactiveConnectionStatus(C connection, ConnectionDefinition definition, boolean isNew)
-
-
Method Details
-
isNew
public boolean isNew()Description copied from interface:ConnectionStatus
A new connection value. Based on the propagation value the connection manager might decide to reuse the existing connection.- Specified by:
isNew
in interfaceConnectionStatus<C>
- Returns:
- true if the connection is new
-
getConnection
Description copied from interface:ConnectionStatus
The connection representation.- Specified by:
getConnection
in interfaceConnectionStatus<C>
- Returns:
- The connection representation
-
getDefinition
Description copied from interface:ConnectionStatus
The connection definition.- Specified by:
getDefinition
in interfaceConnectionStatus<C>
- Returns:
- The connection definition
-
registerSynchronization
Description copied from interface:ConnectionStatus
Register connection synchronization.- Specified by:
registerSynchronization
in interfaceConnectionStatus<C>
- Parameters:
synchronization
- The synchronization
-
registerReactiveSynchronization
Description copied from interface:ReactiveConnectionStatus
Register reactive connection synchronization.- Specified by:
registerReactiveSynchronization
in interfaceReactiveConnectionStatus<C>
- Parameters:
synchronization
- The synchronization
-
onComplete
-
onError
-
onCancel
-