Package org.mariadb.jdbc.pool
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.
-
-
Constructor Summary
Constructors Constructor Description MariaDbInnerPoolConnection(Connection connection)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidensureValidation()Reset last used time, to ensure next retrieval will validate connection before borrowingAtomicLonggetLastUsed()Indicate last time this pool connection has been used.voidlastUsedToNow()Set last poolConnection use to now.-
Methods inherited from class org.mariadb.jdbc.MariaDbPoolConnection
addConnectionEventListener, addStatementEventListener, close, fireConnectionClosed, fireConnectionErrorOccurred, fireStatementClosed, fireStatementErrorOccurred, getConnection, getXAResource, removeConnectionEventListener, removeStatementEventListener, xidToString
-
-
-
-
Constructor Detail
-
MariaDbInnerPoolConnection
public MariaDbInnerPoolConnection(Connection connection)
Constructor.- Parameters:
connection- connection to retrieve connection options
-
-
Method Detail
-
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
-
-