public static final class DefaultHook.GetConnectionTimeout extends DefaultHook implements Hook.GetConnectionTimeout
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 |
|---|
GetConnectionTimeout(ViburConfig config) |
| Modifier and Type | Method and Description |
|---|---|
void |
on(TakenConnection[] takenConnections,
long takenNanos)
A programming hook that will be invoked only when the call to
getConnection() timeouts. |
public GetConnectionTimeout(ViburConfig config)
public void on(TakenConnection[] takenConnections, long takenNanos)
Hook.GetConnectionTimeoutgetConnection() timeouts. Note that if the thread waiting on a getConnection() call is interrupted,
this does not count as a timeout. The hook execution should take as short time as possible.
The invocation of this hook indicates that the current call to getConnection() will throw an SQLTimeoutException.
on in interface Hook.GetConnectionTimeouttakenConnections - an array of all currently taken connectionstakenNanos - the time taken by the call to getConnection()Copyright © 2013-2019 vibur.org. All Rights Reserved.