Interface Connection

All Superinterfaces:
CommandScheduler

public interface Connection extends CommandScheduler
A connection capable of scheduling commands.
  • Method Details

    • isIndeterminatePreparedStatementError

      default boolean isIndeterminatePreparedStatementError(Throwable error)
      Returns:
      true when error is an indeterminate data type reported when preparing a statement
    • tracingPolicy

      TracingPolicy tracingPolicy()
      Returns:
      The connection tracing policy
    • metrics

      ClientMetrics metrics()
      Returns:
      The connection client metrics
    • server

      SocketAddress server()
      Returns:
      the known server address
    • system

      default String system()
      Returns:
      a database specific discriminant / identifier
    • database

      String database()
      Returns:
      the database name
    • user

      String user()
      Returns:
      the database user
    • init

      void init(ConnectionContext context)
      Initialize the connection with the context for its usage.
      Parameters:
      context - the context
    • close

      void close(ConnectionContext holder, Completable<Void> promise)
    • isSsl

      boolean isSsl()
      Returns:
      whether the underlying transport uses TLS
    • isValid

      boolean isValid()
      Returns:
      whether the connection is valid
    • pipeliningLimit

      default int pipeliningLimit()
      Returns:
      the connection pipelining limit, that is how many queries can be scheduled on this connection
    • databaseMetadata

      DatabaseMetadata databaseMetadata()
      Returns:
      the metadata
    • unwrap

      default Connection unwrap()
      Returns:
      the most unwrapped connection (e.g. for pooled connections)