public abstract class ConnectionProxy extends Object implements IHikariConnectionProxy
TRANSACTION_NONE, TRANSACTION_READ_COMMITTED, TRANSACTION_READ_UNCOMMITTED, TRANSACTION_REPEATABLE_READ, TRANSACTION_SERIALIZABLE| Modifier and Type | Method and Description |
|---|---|
void |
captureStack(long leakDetectionThreshold,
Timer scheduler)
Catpure the stack and start leak detection.
|
void |
checkException(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) |
Statement |
createStatement() |
Statement |
createStatement(int resultSetType,
int resultSetConcurrency) |
Statement |
createStatement(int resultSetType,
int resultSetConcurrency,
int resultSetHoldability) |
boolean |
equals(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(Class<?> iface) |
CallableStatement |
prepareCall(String sql) |
CallableStatement |
prepareCall(String sql,
int resultSetType,
int resultSetConcurrency) |
CallableStatement |
prepareCall(String sql,
int resultSetType,
int resultSetConcurrency,
int resultSetHoldability) |
PreparedStatement |
prepareStatement(String sql) |
PreparedStatement |
prepareStatement(String sql,
int autoGeneratedKeys) |
PreparedStatement |
prepareStatement(String sql,
int[] columnIndexes) |
PreparedStatement |
prepareStatement(String sql,
int resultSetType,
int resultSetConcurrency) |
PreparedStatement |
prepareStatement(String sql,
int resultSetType,
int resultSetConcurrency,
int resultSetHoldability) |
PreparedStatement |
prepareStatement(String sql,
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(String catalog) |
void |
setReadOnly(boolean readOnly) |
void |
setTransactionIsolation(int level) |
void |
unclose(long now)
Make the Connection available for use again by marking it as not closed.
|
void |
untrackStatement(Statement statement)
Called by Statement and its subclasses when they are closed to remove them
from the tracking list.
|
<T> T |
unwrap(Class<T> iface) |
getClass, notify, notifyAll, toString, wait, wait, waitabort, 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 void captureStack(long leakDetectionThreshold,
Timer scheduler)
captureStack in interface IHikariConnectionProxyleakDetectionThreshold - the number of milliseconds before a leak is reportedscheduler - the timer to run the leak detection task withpublic final void checkException(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 SQLException
realClose in interface IHikariConnectionProxySQLException - rethrown from the underlying delegate Connectionpublic final void resetConnectionState()
throws SQLException
resetConnectionState in interface IHikariConnectionProxySQLException - 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(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 SQLException
close in interface AutoCloseableclose in interface ConnectionSQLExceptionpublic final boolean isClosed()
throws SQLException
isClosed in interface ConnectionSQLExceptionpublic final Statement createStatement() throws SQLException
createStatement in interface ConnectionSQLExceptionpublic final Statement createStatement(int resultSetType, int resultSetConcurrency) throws SQLException
createStatement in interface ConnectionSQLExceptionpublic final Statement createStatement(int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException
createStatement in interface ConnectionSQLExceptionpublic final CallableStatement prepareCall(String sql) throws SQLException
prepareCall in interface ConnectionSQLExceptionpublic final CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency) throws SQLException
prepareCall in interface ConnectionSQLExceptionpublic final CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException
prepareCall in interface ConnectionSQLExceptionpublic final PreparedStatement prepareStatement(String sql) throws SQLException
prepareStatement in interface ConnectionSQLExceptionpublic final PreparedStatement prepareStatement(String sql, int autoGeneratedKeys) throws SQLException
prepareStatement in interface ConnectionSQLExceptionpublic final PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency) throws SQLException
prepareStatement in interface ConnectionSQLExceptionpublic final PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException
prepareStatement in interface ConnectionSQLExceptionpublic final PreparedStatement prepareStatement(String sql, int[] columnIndexes) throws SQLException
prepareStatement in interface ConnectionSQLExceptionpublic final PreparedStatement prepareStatement(String sql, String[] columnNames) throws SQLException
prepareStatement in interface ConnectionSQLExceptionpublic final boolean isValid(int timeout)
throws SQLException
isValid in interface ConnectionSQLExceptionpublic final void setAutoCommit(boolean autoCommit)
throws SQLException
setAutoCommit in interface ConnectionSQLExceptionpublic final void setReadOnly(boolean readOnly)
throws SQLException
setReadOnly in interface ConnectionSQLExceptionpublic final void setTransactionIsolation(int level)
throws SQLException
setTransactionIsolation in interface ConnectionSQLExceptionpublic final void setCatalog(String catalog) throws SQLException
setCatalog in interface ConnectionSQLExceptionpublic final boolean isWrapperFor(Class<?> iface) throws SQLException
isWrapperFor in interface WrapperSQLExceptionpublic final <T> T unwrap(Class<T> iface) throws SQLException
unwrap in interface WrapperSQLExceptionCopyright © 2014 Zaxxer.com. All rights reserved.