public static final class DefaultHook.CloseConnection extends DefaultHook implements Hook.CloseConnection
DefaultHook.CloseConnection, DefaultHook.GetConnectionTimeout, DefaultHook.GetConnectionTiming, DefaultHook.InitConnection, DefaultHook.QueryTiming, DefaultHook.ResultSetSizeHook.CloseConnection, Hook.DestroyConnection, Hook.GetConnection, Hook.GetConnectionTimeout, Hook.InitConnection, Hook.MethodInvocation, Hook.ResultSetRetrieval, Hook.StatementExecution, Hook.StatementProceedingPoint| Constructor and Description |
|---|
CloseConnection(ViburConfig config) |
| Modifier and Type | Method and Description |
|---|---|
void |
on(Connection rawConnection,
long takenNanos)
A programming hook that will be invoked on the raw JDBC Connection before it is restored back to the
pool as part of the
Connection.close() flow. |
public CloseConnection(ViburConfig config)
public void on(Connection rawConnection, long takenNanos) throws SQLException
Hook.CloseConnectionConnection.close() flow. Its execution should take as short time as possible.
This hook complements the GetConnection hook, which is invoked
after the raw JDBC Connection is taken from the pool.
on in interface Hook.CloseConnectionrawConnection - the raw JDBC Connection that will be returned to the pooltakenNanos - the time for which this connection was held by the application before it was restored
to the pool in nanosecondsSQLException - to indicate that an SQL error has occurredCopyright © 2013-2019 vibur.org. All Rights Reserved.