public abstract class ConnectionProxy extends java.lang.Object implements IHikariConnectionProxy
| Modifier and Type | Method and Description |
|---|---|
void |
captureStack(long leakDetectionThreshold,
java.util.concurrent.ScheduledExecutorService executorService)
Catpure the stack and start leak detection.
|
void |
checkException(java.sql.SQLException sqle)
Check if the provided SQLException contains a SQLSTATE that indicates
a disconnection from the server.
|
void |
close() |
boolean |
compareAndSetState(int expectedState,
int newState) |
java.sql.Statement |
createStatement() |
java.sql.Statement |
createStatement(int resultSetType,
int resultSetConcurrency) |
java.sql.Statement |
createStatement(int resultSetType,
int resultSetConcurrency,
int resultSetHoldability) |
boolean |
equals(java.lang.Object other) |
long |
getExpirationTime()
Get the expiration timestamp of the connection.
|
long |
getLastAccess()
Get the last access timestamp of the connection.
|
long |
getLastOpenTime()
Get the timestamp of when the connection was removed from the pool for use.
|
int |
getState() |
int |
hashCode() |
boolean |
isBrokenConnection()
Return the broken state of the connection.
|
boolean |
isClosed() |
boolean |
isValid(int timeout) |
boolean |
isWrapperFor(java.lang.Class<?> iface) |
java.sql.CallableStatement |
prepareCall(java.lang.String sql) |
java.sql.CallableStatement |
prepareCall(java.lang.String sql,
int resultSetType,
int resultSetConcurrency) |
java.sql.CallableStatement |
prepareCall(java.lang.String sql,
int resultSetType,
int resultSetConcurrency,
int resultSetHoldability) |
java.sql.PreparedStatement |
prepareStatement(java.lang.String sql) |
java.sql.PreparedStatement |
prepareStatement(java.lang.String sql,
int autoGeneratedKeys) |
java.sql.PreparedStatement |
prepareStatement(java.lang.String sql,
int[] columnIndexes) |
java.sql.PreparedStatement |
prepareStatement(java.lang.String sql,
int resultSetType,
int resultSetConcurrency) |
java.sql.PreparedStatement |
prepareStatement(java.lang.String sql,
int resultSetType,
int resultSetConcurrency,
int resultSetHoldability) |
java.sql.PreparedStatement |
prepareStatement(java.lang.String sql,
java.lang.String[] columnNames) |
void |
realClose()
Actually close the underlying delegate Connection.
|
void |
resetConnectionState()
Reset the delegate Connection back to pristine state.
|
void |
setAutoCommit(boolean autoCommit) |
void |
setCatalog(java.lang.String catalog) |
void |
setReadOnly(boolean readOnly) |
void |
setTransactionIsolation(int level) |
java.lang.String |
toString() |
void |
unclose(long now)
Make the Connection available for use again by marking it as not closed.
|
void |
untrackStatement(java.sql.Statement statement)
Called by Statement and its subclasses when they are closed to remove them
from the tracking list.
|
<T> T |
unwrap(java.lang.Class<T> iface) |
abort, clearWarnings, commit, createArrayOf, createBlob, createClob, createNClob, createSQLXML, createStruct, getAutoCommit, getCatalog, getClientInfo, getClientInfo, getHoldability, getMetaData, getNetworkTimeout, getSchema, getTransactionIsolation, getTypeMap, getWarnings, isReadOnly, nativeSQL, releaseSavepoint, rollback, rollback, setClientInfo, setClientInfo, setHoldability, setNetworkTimeout, setSavepoint, setSavepoint, setSchema, setTypeMappublic final boolean equals(java.lang.Object other)
equals in class java.lang.Objectpublic final int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Objectpublic final void captureStack(long leakDetectionThreshold,
java.util.concurrent.ScheduledExecutorService executorService)
captureStack in interface IHikariConnectionProxyleakDetectionThreshold - the number of milliseconds before a leak is reportedexecutorService - the executor service to run the leak detection task withpublic final void checkException(java.sql.SQLException sqle)
checkException in interface IHikariConnectionProxysqle - the SQLException to checkpublic final long getExpirationTime()
getExpirationTime in interface IHikariConnectionProxypublic final long getLastAccess()
getLastAccess in interface IHikariConnectionProxypublic long getLastOpenTime()
getLastOpenTime in interface IHikariConnectionProxypublic final boolean isBrokenConnection()
isBrokenConnection in interface IHikariConnectionProxypublic final void realClose()
throws java.sql.SQLException
realClose in interface IHikariConnectionProxyjava.sql.SQLException - rethrown from the underlying delegate Connectionpublic final void resetConnectionState()
throws java.sql.SQLException
resetConnectionState in interface IHikariConnectionProxyjava.sql.SQLException - thrown if there is an error resetting any of the statepublic final void unclose(long now)
unclose in interface IHikariConnectionProxynow - the current time in millisecondspublic final void untrackStatement(java.sql.Statement statement)
untrackStatement in interface IHikariConnectionProxystatement - the Statement to remove from trackingpublic final int getState()
getState in interface ConcurrentBag.IBagManagablepublic final boolean compareAndSetState(int expectedState,
int newState)
compareAndSetState in interface ConcurrentBag.IBagManagablepublic final void close()
throws java.sql.SQLException
close in interface java.lang.AutoCloseableclose in interface java.sql.Connectionjava.sql.SQLExceptionpublic final boolean isClosed()
throws java.sql.SQLException
isClosed in interface java.sql.Connectionjava.sql.SQLExceptionpublic final java.sql.Statement createStatement()
throws java.sql.SQLException
createStatement in interface java.sql.Connectionjava.sql.SQLExceptionpublic final java.sql.Statement createStatement(int resultSetType,
int resultSetConcurrency)
throws java.sql.SQLException
createStatement in interface java.sql.Connectionjava.sql.SQLExceptionpublic final java.sql.Statement createStatement(int resultSetType,
int resultSetConcurrency,
int resultSetHoldability)
throws java.sql.SQLException
createStatement in interface java.sql.Connectionjava.sql.SQLExceptionpublic final java.sql.CallableStatement prepareCall(java.lang.String sql)
throws java.sql.SQLException
prepareCall in interface java.sql.Connectionjava.sql.SQLExceptionpublic final java.sql.CallableStatement prepareCall(java.lang.String sql,
int resultSetType,
int resultSetConcurrency)
throws java.sql.SQLException
prepareCall in interface java.sql.Connectionjava.sql.SQLExceptionpublic final java.sql.CallableStatement prepareCall(java.lang.String sql,
int resultSetType,
int resultSetConcurrency,
int resultSetHoldability)
throws java.sql.SQLException
prepareCall in interface java.sql.Connectionjava.sql.SQLExceptionpublic final java.sql.PreparedStatement prepareStatement(java.lang.String sql)
throws java.sql.SQLException
prepareStatement in interface java.sql.Connectionjava.sql.SQLExceptionpublic final java.sql.PreparedStatement prepareStatement(java.lang.String sql,
int autoGeneratedKeys)
throws java.sql.SQLException
prepareStatement in interface java.sql.Connectionjava.sql.SQLExceptionpublic final java.sql.PreparedStatement prepareStatement(java.lang.String sql,
int resultSetType,
int resultSetConcurrency)
throws java.sql.SQLException
prepareStatement in interface java.sql.Connectionjava.sql.SQLExceptionpublic final java.sql.PreparedStatement prepareStatement(java.lang.String sql,
int resultSetType,
int resultSetConcurrency,
int resultSetHoldability)
throws java.sql.SQLException
prepareStatement in interface java.sql.Connectionjava.sql.SQLExceptionpublic final java.sql.PreparedStatement prepareStatement(java.lang.String sql,
int[] columnIndexes)
throws java.sql.SQLException
prepareStatement in interface java.sql.Connectionjava.sql.SQLExceptionpublic final java.sql.PreparedStatement prepareStatement(java.lang.String sql,
java.lang.String[] columnNames)
throws java.sql.SQLException
prepareStatement in interface java.sql.Connectionjava.sql.SQLExceptionpublic final boolean isValid(int timeout)
throws java.sql.SQLException
isValid in interface java.sql.Connectionjava.sql.SQLExceptionpublic final void setAutoCommit(boolean autoCommit)
throws java.sql.SQLException
setAutoCommit in interface java.sql.Connectionjava.sql.SQLExceptionpublic final void setReadOnly(boolean readOnly)
throws java.sql.SQLException
setReadOnly in interface java.sql.Connectionjava.sql.SQLExceptionpublic final void setTransactionIsolation(int level)
throws java.sql.SQLException
setTransactionIsolation in interface java.sql.Connectionjava.sql.SQLExceptionpublic final void setCatalog(java.lang.String catalog)
throws java.sql.SQLException
setCatalog in interface java.sql.Connectionjava.sql.SQLExceptionpublic final boolean isWrapperFor(java.lang.Class<?> iface)
throws java.sql.SQLException
isWrapperFor in interface java.sql.Wrapperjava.sql.SQLExceptionpublic final <T> T unwrap(java.lang.Class<T> iface)
throws java.sql.SQLException
unwrap in interface java.sql.Wrapperjava.sql.SQLExceptionCopyright © 2014 Zaxxer.com. All Rights Reserved.