Class MariaDbInnerPoolConnection

java.lang.Object
org.mariadb.jdbc.MariaDbPoolConnection
org.mariadb.jdbc.pool.MariaDbInnerPoolConnection
All Implemented Interfaces:
PooledConnection, XAConnection

public class MariaDbInnerPoolConnection extends MariaDbPoolConnection
MariaDB pool connection for internal pool permit to add a last used information, to remove connection after staying in pool for long time.
  • Field Details

  • Constructor Details

    • MariaDbInnerPoolConnection

      public MariaDbInnerPoolConnection(Connection connection)
      Constructor.
      Parameters:
      connection - connection to retrieve connection options
  • Method Details

    • getLastUsed

      public AtomicLong getLastUsed()
      Indicate last time this pool connection has been used.
      Returns:
      current last used time (nano).
    • lastUsedToNow

      public void lastUsedToNow()
      Set last poolConnection use to now.
    • ensureValidation

      public void ensureValidation()
      Reset last used time, to ensure next retrieval will validate connection before borrowing