Class DefaultConnectionStatus<C>
java.lang.Object
io.micronaut.data.connection.support.DefaultConnectionStatus<C>
- Type Parameters:
C
- The connection type
- All Implemented Interfaces:
ConnectionStatus<C>
@Internal
public final class DefaultConnectionStatus<C>
extends Object
implements ConnectionStatus<C>
The default connection status.
- Since:
- 4.0.0
- Author:
- Denis Stepanov
-
Constructor Summary
ConstructorDescriptionDefaultConnectionStatus
(C connection, ConnectionDefinition definition, boolean isNew) -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
void
complete()
The connection representation.The connection definition.boolean
isNew()
A new connection value.void
registerSynchronization
(ConnectionSynchronization synchronization) Register connection synchronization.
-
Constructor Details
-
DefaultConnectionStatus
-
-
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
-
complete
public void complete() -
beforeClosed
public void beforeClosed() -
afterClosed
public void afterClosed()
-