public abstract class CachingLogicalConnection extends LogicalConnection
An instance of this class is what is passed out the the client. It uses a JDBC statement object cache to avoid re-preparing commonly used queries. The cache has scope of a physical connection, and is lost when the pooled connection is closed (which includes closing the physical connection).
StatementCacheInteractorphysicalConnection_TRANSACTION_NONE, TRANSACTION_READ_COMMITTED, TRANSACTION_READ_UNCOMMITTED, TRANSACTION_REPEATABLE_READ, TRANSACTION_SERIALIZABLE| Constructor and Description |
|---|
CachingLogicalConnection(Connection physicalConnection,
ClientPooledConnection pooledConnection,
JDBCStatementCache stmtCache)
Creates a new logical connection which caches prepared statements.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
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) |
checkForNullPhysicalConnection, clearWarnings, closeWithoutRecyclingToPool, commit, createStatement, createStatement, createStatement, finalize, getAutoCommit, getCatalog, getHoldability, getMetaData, getServerVersion, getTransactionID, getTransactionIsolation, getTypeMap, getWarnings, isClosed, isReadOnly, nativeSQL, nullPhysicalConnection, preparePositionedUpdateStatement, releaseSavepoint, rollback, rollback, setAutoCommit, setCatalog, setHoldability, setReadOnly, setSavepoint, setSavepoint, setTransactionIsolation, setTypeMapclone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitabort, createArrayOf, createBlob, createClob, createNClob, createSQLXML, createStruct, getClientInfo, getClientInfo, getNetworkTimeout, getSchema, isValid, setClientInfo, setClientInfo, setNetworkTimeout, setSchemaisWrapperFor, unwrappublic CachingLogicalConnection(Connection physicalConnection, ClientPooledConnection pooledConnection, JDBCStatementCache stmtCache) throws SqlException
physicalConnection - underlying physical database connectionpooledConnection - associated pooled connectionstmtCache - associated statement cacheSqlException - if creating the logical connection failspublic void close()
throws SQLException
close in interface AutoCloseableclose in interface Connectionclose in class LogicalConnectionSQLExceptionpublic PreparedStatement prepareStatement(String sql) throws SQLException
prepareStatement in interface ConnectionprepareStatement in class LogicalConnectionSQLExceptionpublic PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency) throws SQLException
prepareStatement in interface ConnectionprepareStatement in class LogicalConnectionSQLExceptionpublic PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException
prepareStatement in interface ConnectionprepareStatement in class LogicalConnectionSQLExceptionpublic PreparedStatement prepareStatement(String sql, int autoGeneratedKeys) throws SQLException
prepareStatement in interface ConnectionprepareStatement in class LogicalConnectionSQLExceptionpublic PreparedStatement prepareStatement(String sql, int[] columnIndexes) throws SQLException
prepareStatement in interface ConnectionprepareStatement in class LogicalConnectionSQLExceptionpublic PreparedStatement prepareStatement(String sql, String[] columnNames) throws SQLException
prepareStatement in interface ConnectionprepareStatement in class LogicalConnectionSQLExceptionpublic CallableStatement prepareCall(String sql) throws SQLException
prepareCall in interface ConnectionprepareCall in class LogicalConnectionSQLExceptionpublic CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency) throws SQLException
prepareCall in interface ConnectionprepareCall in class LogicalConnectionSQLExceptionpublic CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException
prepareCall in interface ConnectionprepareCall in class LogicalConnectionSQLExceptionCopyright © 2010-2015 Pivotal Software, Inc. All rights reserved.