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 Details

    • DefaultConnectionStatus

      public DefaultConnectionStatus(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 interface ConnectionStatus<C>
      Returns:
      true if the connection is new
    • getConnection

      public C getConnection()
      Description copied from interface: ConnectionStatus
      The connection representation.
      Specified by:
      getConnection in interface ConnectionStatus<C>
      Returns:
      The connection representation
    • getDefinition

      public ConnectionDefinition getDefinition()
      Description copied from interface: ConnectionStatus
      The connection definition.
      Specified by:
      getDefinition in interface ConnectionStatus<C>
      Returns:
      The connection definition
    • registerSynchronization

      public void registerSynchronization(ConnectionSynchronization synchronization)
      Description copied from interface: ConnectionStatus
      Register connection synchronization.
      Specified by:
      registerSynchronization in interface ConnectionStatus<C>
      Parameters:
      synchronization - The synchronization
    • complete

      public void complete()
    • beforeClosed

      public void beforeClosed()
    • afterClosed

      public void afterClosed()