public abstract class Connection extends Object implements Connection, ConnectionCallbackInterface
| Modifier and Type | Class and Description |
|---|---|
static class |
Connection.FailoverStatus
Return status of
Connection#doFailoverOnException(String, int)
method. |
| Modifier and Type | Field and Description |
|---|---|
Agent |
agent_ |
protected String |
alternateNetServers_
Any alternative locators/servers that have been provided via the
property "secondary-locators=
|
boolean |
autoCommit_ |
int |
clientSSLMode_ |
int |
commBufferSize_ |
String |
currentSchemaName_
Cached copy of the schema name.
|
TxID |
currTXID |
DatabaseMetaData |
databaseMetaData_ |
String |
databaseName_ |
ClientBaseDataSource |
dataSource_ |
static int |
DEFAULT_LOGIN_TIMEOUT
Maximum timeout in seconds for read before failover in case nothing is
specified.
|
static int |
DEFAULT_SINGLE_HOP_MAX_CONN_PER_SERVER |
protected int |
defaultIsolation_
The default isolation level, enforced on connection resets.
|
protected boolean |
disableCancel_
If true, then
Statement.cancel() thru thin driver will not
be supported. |
boolean |
disableStreaming_
Flag to indicate that server side streaming of data is disabled.
|
boolean |
disableTXBatching_
Flag to disable all batching in transactions, flushing ops immediately
to detect conflicts immediately.
|
int |
dncGeneratedSavepointId_ |
static String |
dncGeneratedSavepointNamePrefix__ |
protected String |
doSetSchema_
Constant indicating that isolation_ has not been updated through
piggy-backing, (or that the previously stored value was invalidated,
e.g.
|
protected EncryptionManager |
encryptionManager_ |
int |
executionSequence |
static int |
INFINITE_LOGIN_TIMEOUT
Special token to indicate infinite login timeout using the
DriverManager.setLoginTimeout() API.
|
protected boolean |
inUnitOfWork_ |
protected int |
isolation_
Cached copy of the isolation level.
|
protected boolean |
isXAConnection_ |
protected boolean |
jdbcReadOnly_ |
int |
keepAliveCnt_ |
int |
keepAliveIdle_ |
int |
keepAliveIntvl_ |
protected boolean |
loadBalance_
If false then don't attempt load-balancing for this connection, else
the default is to do load-balancing.
|
protected CallableLocatorProcedures |
lobProcs
Reference to object with prepared statements for calling the locator
procedures.
|
int |
loginTimeout_ |
int |
ncjBatchSize_
NCJ Batch Size
|
int |
ncjCacheSize_
NCJ Cache Size
|
int |
portNumber_ |
int |
prevSuccessfulSeq |
String |
productID_ |
boolean |
queryHDFS_
Flag to indicate the server side queries HDFS data
|
boolean |
resetConnectionAtFirstSql_ |
boolean |
retrieveMessageText_ |
protected int |
serverModifyLevel_ |
String |
serverNameIP_ |
protected int |
serverReleaseLevel_ |
com.gemstone.gemfire.internal.shared.Version |
serverVersion |
protected int |
serverVersionLevel_ |
static int |
SINGLE_HOP_MAX_CONN_PER_SERVER |
int |
singleHopAttempted
counter for testing to see how many single hops were actually done.
|
protected boolean |
singleHopEnabled_
If false then don't attempt fetching single hop information from
the server.
|
boolean |
skipConstraints_
Flag to indicate that transactions on this connection should use
"waiting mode" instead of "fail-fast conflict" detection.
|
boolean |
skipListeners_
Flag to indicate the server side skip listeners property .
|
protected boolean |
skipLocks_
if true then all DD and table locks are skipped for this connection
|
int |
successfulExecutionSequence |
boolean |
syncCommits_
Flag to indicate that transactions on this connection should sync all
commits before returning (i.e.
|
protected static int |
TRANSACTION_UNKNOWN |
boolean |
useBoundedQueuePool_ |
protected String |
user_ |
static int |
XA_T0_NOT_ASSOCIATED
XA_T0_NOT_ASSOCIATED
This connection is not currently associated with an XA transaction
In this state commits will flow in autocommit mode. |
static int |
XA_T1_ASSOCIATED
XA_T1_ASSOCIATED
In this state commits will not flow in autocommit mode. |
int |
xaHostVersion_ |
TRANSACTION_NONE, TRANSACTION_READ_COMMITTED, TRANSACTION_READ_UNCOMMITTED, TRANSACTION_REPEATABLE_READ, TRANSACTION_SERIALIZABLE| Modifier | Constructor and Description |
|---|---|
protected |
Connection(LogWriter logWriter,
boolean isXAConn,
ClientBaseDataSource dataSource) |
protected |
Connection(LogWriter logWriter,
int driverManagerLoginTimeout,
String serverName,
int portNumber,
String databaseName,
Properties properties) |
protected |
Connection(LogWriter logWriter,
String user,
String password,
boolean isXAConn,
ClientBaseDataSource dataSource) |
protected |
Connection(LogWriter logWriter,
String user,
String password,
ClientBaseDataSource dataSource) |
| Modifier and Type | Method and Description |
|---|---|
void |
accumulate440WarningForMessageProcFailure(SqlWarning e) |
void |
accumulate444WarningForMessageProcFailure(SqlWarning e) |
void |
accumulateWarning(SqlWarning e) |
abstract void |
addSpecialRegisters(String s) |
protected abstract boolean |
allowCloseInUOW_() |
protected abstract boolean |
allowLocalCommitRollback_() |
boolean |
cancelDisabled() |
protected void |
checkForClosedConnection() |
void |
clearWarnings() |
void |
clearWarningsX() |
void |
close() |
void |
closeForReuse(boolean statementPooling) |
void |
closeResources() |
void |
closeX() |
void |
commit() |
void |
completeAbnormalUnitOfWork() |
void |
completeAbnormalUnitOfWork(UnitOfWorkListener uwl)
Rollback the UnitOfWorkListener specifically.
|
void |
completeChainBreakingDisconnect() |
void |
completeConnect() |
void |
completeInitialPiggyBackIsolation(int pbIsolation)
Sets the default isolation level of the connection upon connection
initialization.
|
void |
completeInitialPiggyBackSchema(String pbSchema)
Sets the current schema upon connection initialization.
|
void |
completeLocalCommit() |
void |
completeLocalRollback() |
void |
completePiggyBackIsolation(int pbIsolation)
Completes piggy-backing of the new current isolation level by
updating the cached copy in am.Connection.
|
void |
completePiggyBackSchema(String pbSchema)
Completes piggy-backing of the new current schema by updating
the cached copy in am.Connection.
|
protected void |
completeReset(boolean isDeferredReset,
boolean closeStatementsOnClose,
boolean fullReset) |
protected void |
completeReset(boolean isDeferredReset,
boolean closeStatementsOnClose,
NetXAResource xares)
NOTE:The following comments are valid for the changes done as part of implementing statement caching only (see DERBY-3313 and linked issues). |
void |
completeServerVersion(int majorVersion) |
void |
completeSpecificRollback(UnitOfWorkListener uwl)
Rollback the specific UnitOfWorkListener.
|
void |
completeSqlca(Sqlca sqlca) |
Blob |
createBlob() |
Clob |
createClob()
Constructs an object that implements the
Clob interface. |
Statement |
createStatement() |
Statement |
createStatement(int resultSetType,
int resultSetConcurrency) |
Statement |
createStatement(int resultSetType,
int resultSetConcurrency,
int resultSetHoldability) |
protected abstract boolean |
doCloseStatementsOnClose_() |
abstract Connection.FailoverStatus |
doFailoverOnException(String sqlState,
int errorCode,
Exception thrownEx) |
protected void |
finalize() |
boolean |
flowAutoCommit() |
void |
flowCommit() |
protected void |
flowRollback() |
boolean |
getAutoCommit() |
String |
getCatalog() |
abstract Properties |
getConnectionProperties() |
String |
getCurrentSchemaName()
Returns the current schema (the schema that would be used for
compilation.
|
int |
getHoldability() |
abstract InputStream |
getInputStream() |
DatabaseMetaData |
getMetaData() |
abstract OutputStream |
getOutputStream() |
abstract String |
getServerLocation() |
int |
getServerVersion() |
int |
getTransactionID()
Returns the ID of the active transaction for this connection.
|
int |
getTransactionIsolation() |
int |
getTransactionIsolationX() |
Map |
getTypeMap() |
SQLWarning |
getWarnings() |
int |
getXAState() |
abstract Set |
handleFailover(Set failedUrls,
SqlException ex) |
int |
incrementAndGetExecutionSequence() |
static void |
init() |
protected void |
initConnection(LogWriter logWriter,
String password,
ClientBaseDataSource dataSource) |
static void |
initialize() |
boolean |
isClosed() |
boolean |
isClosedX() |
protected abstract boolean |
isGlobalPending_() |
boolean |
isOpen()
Returns if a transaction is in process
|
boolean |
isPhysicalConnClosed()
Return true if the physical connection is still open.
|
boolean |
isReadOnly() |
boolean |
isSingleHopEnabled()
Constructs an object that implements the
Blob interface. |
boolean |
isXAConnection() |
void |
lightReset() |
protected CallableLocatorProcedures |
locatorProcedureCall()
Get handle to the object that contains prepared statements for calling
locator procedures for this connection.
|
protected abstract void |
markClosed_() |
protected void |
markClosed() |
void |
markClosed(boolean statementPooling) |
protected void |
markOpen(String method) |
String |
nativeSQL(String sql) |
String |
nativeSQLX(String sql) |
protected abstract Agent |
newAgent_(LogWriter logWriter,
int loginTimeout,
String serverName,
int portNumber,
int clientSSLMode,
Properties properties) |
protected abstract CallableStatement |
newCallableStatement_(String sql,
int type,
int concurrency,
int holdability) |
protected abstract DatabaseMetaData |
newDatabaseMetaData_() |
protected abstract PreparedStatement |
newPositionedUpdatePreparedStatement_(String sql,
Section section) |
protected abstract PreparedStatement |
newPreparedStatement_(String sql,
int type,
int concurrency,
int holdability,
int autoGeneratedKeys,
String[] columnNames,
int[] columnIndexes) |
abstract SectionManager |
newSectionManager(String collection,
Agent agent,
String databaseName) |
protected abstract Statement |
newStatement_(int type,
int concurrency,
int holdability) |
protected abstract void |
preAgentInitialize(String password,
ClientBaseDataSource dataSource,
Properties properties) |
CallableStatement |
prepareCall(String sql) |
CallableStatement |
prepareCall(String sql,
int resultSetType,
int resultSetConcurrency) |
CallableStatement |
prepareCall(String sql,
int resultSetType,
int resultSetConcurrency,
int resultSetHoldability) |
CallableStatement |
prepareMessageProc(String sql) |
PreparedStatement |
preparePositionedUpdateStatement(String sql,
Section querySection) |
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 |
readCommit() |
abstract void |
readCommitSubstitute_() |
abstract void |
readLocalCommit_() |
abstract void |
readLocalRollback_() |
abstract void |
readLocalXACommit_() |
abstract void |
readLocalXARollback_() |
abstract void |
readLocalXAStart_() |
void |
readRollback() |
void |
readTransactionStart() |
protected abstract void |
readXACommit_() |
protected abstract void |
readXARollback_() |
void |
releaseSavepoint(Savepoint savepoint) |
protected abstract void |
reset_(LogWriter logWriter) |
void |
reset(LogWriter logWriter) |
protected abstract void |
resetCallableStatement_(CallableStatement cs,
String sql,
int resultSetType,
int resultSetConcurrency,
int resultSetHoldability) |
protected void |
resetConnection(LogWriter logWriter) |
protected void |
resetPrepareCall(CallableStatement cs) |
protected abstract void |
resetPreparedStatement_(PreparedStatement ps,
String sql,
int resultSetType,
int resultSetConcurrency,
int resultSetHoldability,
int autoGeneratedKeys,
String[] columnNames,
int[] columnIndexes) |
protected void |
resetPrepareStatement(PreparedStatement ps) |
protected abstract void |
resetStatement_(Statement statement,
int type,
int concurrency,
int holdability) |
protected void |
resetStatement(Statement s) |
void |
rollback() |
void |
rollback(Savepoint savepoint) |
protected abstract boolean |
serverSupportsLocators()
Checks whether the server supports locators for large objects.
|
void |
setAutoCommit(boolean autoCommit) |
protected void |
setAutoCommitX(boolean autoCommit) |
void |
setCatalog(String catalog) |
void |
setHoldability(int holdability) |
void |
setInUnitOfWork(boolean inUnitOfWork) |
void |
setReadOnly(boolean readOnly) |
Savepoint |
setSavepoint() |
Savepoint |
setSavepoint(String name) |
void |
setTransactionIsolation(int level) |
protected void |
setTransactionIsolationX(int level)
Set the transaction isolation level as specified.
|
void |
setTypeMap(Map map) |
void |
setXAState(int state) |
protected abstract boolean |
supportsSessionDataCaching()
Finds out if the underlaying database connection supports session data
caching.
|
boolean |
transactionInProgress()
Check if there are uncommitted operations in the current transaction
that prevent us from closing the connection.
|
boolean |
willAutoCommitGenerateFlow() |
void |
writeCommit() |
abstract void |
writeCommitSubstitute_() |
abstract void |
writeLocalCommit_() |
abstract void |
writeLocalRollback_() |
abstract void |
writeLocalXACommit_() |
abstract void |
writeLocalXARollback_() |
abstract void |
writeLocalXAStart_() |
void |
writeRollback() |
void |
writeTransactionStart(Statement statement) |
protected abstract void |
writeXACommit_() |
protected abstract void |
writeXARollback_() |
protected abstract void |
writeXATransactionStart(Statement statement) |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitabort, createArrayOf, createNClob, createSQLXML, createStruct, getClientInfo, getClientInfo, getNetworkTimeout, getSchema, isValid, setClientInfo, setClientInfo, setNetworkTimeout, setSchemaisWrapperFor, unwrappublic Agent agent_
public DatabaseMetaData databaseMetaData_
protected final String user_
public boolean retrieveMessageText_
protected boolean jdbcReadOnly_
public String databaseName_
public String productID_
protected int serverVersionLevel_
protected int serverReleaseLevel_
protected int serverModifyLevel_
protected EncryptionManager encryptionManager_
protected String doSetSchema_
protected static final int TRANSACTION_UNKNOWN
protected int isolation_
protected int defaultIsolation_
Note that this value may be changed upon connection initialization in the future, as the server can piggy-back the isolation level.
public String currentSchemaName_
public boolean autoCommit_
public int executionSequence
public int successfulExecutionSequence
public int prevSuccessfulSeq
public TxID currTXID
public com.gemstone.gemfire.internal.shared.Version serverVersion
protected boolean inUnitOfWork_
protected boolean isXAConnection_
public static final int XA_T0_NOT_ASSOCIATED
XA_T0_NOT_ASSOCIATED
This connection is not currently associated with an XA transaction
In this state commits will flow in autocommit mode.public static final int XA_T1_ASSOCIATED
XA_T1_ASSOCIATED
In this state commits will not flow in autocommit mode.public int xaHostVersion_
public int loginTimeout_
public ClientBaseDataSource dataSource_
public String serverNameIP_
public int portNumber_
public int clientSSLMode_
public int commBufferSize_
public boolean resetConnectionAtFirstSql_
protected boolean loadBalance_
protected String alternateNetServers_
public boolean disableStreaming_
public boolean skipListeners_
public boolean queryHDFS_
public boolean skipConstraints_
public boolean syncCommits_
public boolean disableTXBatching_
ClientAttribute.DISABLE_TX_BATCHINGprotected boolean singleHopEnabled_
public int singleHopAttempted
protected boolean disableCancel_
Statement.cancel() thru thin driver will not
be supported. The driver will not ask for statementUUID from the server.public boolean useBoundedQueuePool_
public int ncjBatchSize_
public int ncjCacheSize_
protected boolean skipLocks_
public int keepAliveIdle_
public int keepAliveIntvl_
public int keepAliveCnt_
public static final int DEFAULT_LOGIN_TIMEOUT
public static final int INFINITE_LOGIN_TIMEOUT
public static final int DEFAULT_SINGLE_HOP_MAX_CONN_PER_SERVER
public static int SINGLE_HOP_MAX_CONN_PER_SERVER
public int dncGeneratedSavepointId_
public static final String dncGeneratedSavepointNamePrefix__
protected CallableLocatorProcedures lobProcs
protected Connection(LogWriter logWriter, String user, String password, ClientBaseDataSource dataSource) throws SqlException
SqlExceptionprotected Connection(LogWriter logWriter, String user, String password, boolean isXAConn, ClientBaseDataSource dataSource) throws SqlException
SqlExceptionprotected Connection(LogWriter logWriter, boolean isXAConn, ClientBaseDataSource dataSource) throws SqlException
SqlExceptionprotected Connection(LogWriter logWriter, int driverManagerLoginTimeout, String serverName, int portNumber, String databaseName, Properties properties) throws SqlException
SqlExceptionprotected void initConnection(LogWriter logWriter, String password, ClientBaseDataSource dataSource) throws SqlException
SqlExceptionpublic static void init()
public static void initialize()
protected abstract void preAgentInitialize(String password, ClientBaseDataSource dataSource, Properties properties) throws SqlException
SqlExceptionpublic abstract Set handleFailover(Set failedUrls, SqlException ex) throws SqlException
SqlExceptionpublic abstract String getServerLocation()
public abstract Properties getConnectionProperties()
public abstract Connection.FailoverStatus doFailoverOnException(String sqlState, int errorCode, Exception thrownEx)
public abstract OutputStream getOutputStream()
public abstract InputStream getInputStream()
protected void resetConnection(LogWriter logWriter) throws SqlException
SqlExceptionprotected void finalize()
throws Throwable
public Statement createStatement() throws SQLException
createStatement in interface ConnectionSQLExceptionpublic PreparedStatement prepareStatement(String sql) throws SQLException
prepareStatement in interface ConnectionSQLExceptionpublic PreparedStatement preparePositionedUpdateStatement(String sql, Section querySection) throws SqlException
SqlExceptionpublic CallableStatement prepareCall(String sql) throws SQLException
prepareCall in interface ConnectionSQLExceptionpublic String nativeSQL(String sql) throws SQLException
nativeSQL in interface ConnectionSQLExceptionpublic String nativeSQLX(String sql) throws SqlException
SqlExceptionprotected abstract boolean allowLocalCommitRollback_()
throws SqlException
SqlExceptionprotected final void setAutoCommitX(boolean autoCommit)
throws SqlException
SqlExceptionpublic void setAutoCommit(boolean autoCommit)
throws SQLException
setAutoCommit in interface ConnectionSQLExceptionpublic boolean getAutoCommit()
throws SQLException
getAutoCommit in interface ConnectionSQLExceptionpublic void commit()
throws SQLException
commit in interface ConnectionSQLExceptionpublic void flowCommit()
throws SqlException
SqlExceptionpublic boolean flowAutoCommit()
throws SqlException
SqlExceptionpublic boolean willAutoCommitGenerateFlow()
throws SqlException
SqlExceptionpublic void writeCommit()
throws SqlException
SqlExceptionpublic void readCommit()
throws SqlException
SqlExceptionpublic void rollback()
throws SQLException
rollback in interface ConnectionSQLExceptionprotected void flowRollback()
throws SqlException
SqlExceptionpublic void writeRollback()
throws SqlException
SqlExceptionpublic void readRollback()
throws SqlException
SqlExceptionpublic void close()
throws SQLException
close in interface AutoCloseableclose in interface ConnectionSQLExceptionpublic boolean transactionInProgress()
true if the connection cannot be closed due to
uncommitted operations in the transactionpublic void closeX()
throws SQLException
SQLExceptionpublic void closeResources()
throws SQLException
SQLExceptionprotected abstract boolean isGlobalPending_()
public void closeForReuse(boolean statementPooling)
throws SqlException
SqlExceptionprotected abstract void markClosed_()
protected final void markOpen(String method)
protected final void markClosed()
public void markClosed(boolean statementPooling)
public boolean isPhysicalConnClosed()
public final boolean isClosed()
isClosed in interface Connectionpublic final boolean isClosedX()
public final boolean isOpen()
public void setTransactionIsolation(int level)
throws SQLException
setTransactionIsolation in interface ConnectionSQLExceptionprotected final void setTransactionIsolationX(int level)
throws SqlException
If this method is called during a transaction, the result is implementation-defined.
Information about Derby specific isolation level handling:
SqlExceptionprotected abstract boolean supportsSessionDataCaching()
protected abstract boolean serverSupportsLocators()
true if LOB locators are supported.public int getTransactionIsolation()
throws SQLException
getTransactionIsolation in interface ConnectionSQLExceptionpublic int getTransactionIsolationX()
throws SQLException
SQLExceptionpublic int getTransactionID()
public String getCurrentSchemaName() throws SQLException
SQLExceptionpublic SQLWarning getWarnings() throws SQLException
getWarnings in interface ConnectionSQLExceptionpublic void clearWarnings()
throws SQLException
clearWarnings in interface ConnectionSQLExceptionpublic void clearWarningsX()
throws SqlException
SqlExceptionpublic DatabaseMetaData getMetaData() throws SQLException
getMetaData in interface ConnectionSQLExceptionpublic void setReadOnly(boolean readOnly)
throws SQLException
setReadOnly in interface ConnectionSQLExceptionpublic boolean isReadOnly()
throws SQLException
isReadOnly in interface ConnectionSQLExceptionpublic void setCatalog(String catalog) throws SQLException
setCatalog in interface ConnectionSQLExceptionpublic String getCatalog() throws SQLException
getCatalog in interface ConnectionSQLExceptionpublic Statement createStatement(int resultSetType, int resultSetConcurrency) throws SQLException
createStatement in interface ConnectionSQLExceptionpublic PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency) throws SQLException
prepareStatement in interface ConnectionSQLExceptionpublic CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency) throws SQLException
prepareCall in interface ConnectionSQLExceptionpublic CallableStatement prepareMessageProc(String sql) throws SqlException
SqlExceptionpublic Map getTypeMap() throws SQLException
getTypeMap in interface ConnectionSQLExceptionpublic void setTypeMap(Map map) throws SQLException
setTypeMap in interface ConnectionSQLExceptionpublic void setHoldability(int holdability)
throws SQLException
setHoldability in interface ConnectionSQLExceptionpublic int getHoldability()
throws SQLException
getHoldability in interface ConnectionSQLExceptionpublic Savepoint setSavepoint() throws SQLException
setSavepoint in interface ConnectionSQLExceptionpublic Savepoint setSavepoint(String name) throws SQLException
setSavepoint in interface ConnectionSQLExceptionpublic void rollback(Savepoint savepoint) throws SQLException
rollback in interface ConnectionSQLExceptionpublic void releaseSavepoint(Savepoint savepoint) throws SQLException
releaseSavepoint in interface ConnectionSQLExceptionpublic Statement createStatement(int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException
createStatement in interface ConnectionSQLExceptionprotected void resetStatement(Statement s) throws SqlException
SqlExceptionpublic PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException
prepareStatement in interface ConnectionSQLExceptionprotected void resetPrepareStatement(PreparedStatement ps) throws SqlException
SqlExceptionpublic CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException
prepareCall in interface ConnectionSQLExceptionprotected void resetPrepareCall(CallableStatement cs) throws SqlException
SqlExceptionpublic PreparedStatement prepareStatement(String sql, int autoGeneratedKeys) throws SQLException
prepareStatement in interface ConnectionSQLExceptionpublic PreparedStatement prepareStatement(String sql, int[] columnIndexes) throws SQLException
prepareStatement in interface ConnectionSQLExceptionpublic PreparedStatement prepareStatement(String sql, String[] columnNames) throws SQLException
prepareStatement in interface ConnectionSQLExceptionprotected abstract boolean allowCloseInUOW_()
protected abstract boolean doCloseStatementsOnClose_()
public abstract SectionManager newSectionManager(String collection, Agent agent, String databaseName)
protected abstract Agent newAgent_(LogWriter logWriter, int loginTimeout, String serverName, int portNumber, int clientSSLMode, Properties properties) throws SqlException
SqlExceptionprotected abstract DatabaseMetaData newDatabaseMetaData_()
protected abstract Statement newStatement_(int type, int concurrency, int holdability) throws SqlException
SqlExceptionprotected abstract void resetStatement_(Statement statement, int type, int concurrency, int holdability) throws SqlException
SqlExceptionprotected abstract PreparedStatement newPositionedUpdatePreparedStatement_(String sql, Section section) throws SqlException
SqlExceptionprotected abstract PreparedStatement newPreparedStatement_(String sql, int type, int concurrency, int holdability, int autoGeneratedKeys, String[] columnNames, int[] columnIndexes) throws SqlException
SqlExceptionprotected abstract void resetPreparedStatement_(PreparedStatement ps, String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability, int autoGeneratedKeys, String[] columnNames, int[] columnIndexes) throws SqlException
SqlExceptionprotected abstract CallableStatement newCallableStatement_(String sql, int type, int concurrency, int holdability) throws SqlException
SqlExceptionprotected abstract void resetCallableStatement_(CallableStatement cs, String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SqlException
SqlExceptionpublic void completeConnect()
throws SqlException
SqlExceptionpublic abstract void writeCommitSubstitute_()
throws SqlException
SqlExceptionpublic abstract void readCommitSubstitute_()
throws SqlException
SqlExceptionpublic abstract void writeLocalXAStart_()
throws SqlException
SqlExceptionpublic abstract void readLocalXAStart_()
throws SqlException
SqlExceptionpublic abstract void writeLocalXACommit_()
throws SqlException
SqlExceptionprotected abstract void writeXACommit_()
throws SqlException
SqlExceptionpublic abstract void readLocalXACommit_()
throws SqlException
SqlExceptionprotected abstract void readXACommit_()
throws SqlException
SqlExceptionpublic abstract void writeLocalCommit_()
throws SqlException
SqlExceptionpublic abstract void readLocalCommit_()
throws SqlException
SqlExceptionprotected abstract void writeXATransactionStart(Statement statement) throws SqlException
SqlExceptionpublic void completeLocalCommit()
completeLocalCommit in interface ConnectionCallbackInterfacepublic abstract void writeLocalRollback_()
throws SqlException
SqlExceptionpublic abstract void readLocalRollback_()
throws SqlException
SqlExceptionpublic void completeLocalRollback()
completeLocalRollback in interface ConnectionCallbackInterfacepublic void completeSpecificRollback(UnitOfWorkListener uwl)
uwl - The UnitOfWorkLitener to be rolled backpublic abstract void writeLocalXARollback_()
throws SqlException
SqlExceptionprotected abstract void writeXARollback_()
throws SqlException
SqlExceptionpublic abstract void readLocalXARollback_()
throws SqlException
SqlExceptionprotected abstract void readXARollback_()
throws SqlException
SqlExceptionpublic void writeTransactionStart(Statement statement) throws SqlException
SqlExceptionpublic void readTransactionStart()
throws SqlException
SqlExceptionpublic void completeAbnormalUnitOfWork()
completeAbnormalUnitOfWork in interface ConnectionCallbackInterfacepublic void completeAbnormalUnitOfWork(UnitOfWorkListener uwl)
completeAbnormalUnitOfWork in interface ConnectionCallbackInterfaceuwl - The UnitOfWorkListener to be rolled back.public void completeChainBreakingDisconnect()
completeChainBreakingDisconnect in interface ConnectionCallbackInterfacepublic void completeSqlca(Sqlca sqlca)
completeSqlca in interface ConnectionCallbackInterfacepublic void completePiggyBackIsolation(int pbIsolation)
ConnectionCallbackInterfacecompletePiggyBackIsolation in interface ConnectionCallbackInterfacepbIsolation - new isolation level from the serverpublic void completeServerVersion(int majorVersion)
public void completeInitialPiggyBackIsolation(int pbIsolation)
Note that depending on the server version, the default isolation value may not be piggy-backed on the initialization flow. In that case, the default is assumed / hardcoded to be READ_COMMITTED.
pbIsolation - isolation level as specified by
java.sql.Connectionpublic void completePiggyBackSchema(String pbSchema)
ConnectionCallbackInterfacecompletePiggyBackSchema in interface ConnectionCallbackInterfacepbSchema - new current schema from the serverpublic void completeInitialPiggyBackSchema(String pbSchema)
pbSchema - the schema namepublic abstract void addSpecialRegisters(String s)
public void reset(LogWriter logWriter) throws SqlException
SqlExceptionpublic void lightReset()
throws SqlException
SqlExceptionprotected abstract void reset_(LogWriter logWriter) throws SqlException
SqlExceptionprotected void completeReset(boolean isDeferredReset,
boolean closeStatementsOnClose,
NetXAResource xares)
throws SqlException
We don't reset the isolation level to unknown unconditionally, as this forces us to go to the server all the time. Since the value should now be valid (DERBY-3192), we check if it has been changed from the default.
closeStatementsOnClose - is used to differentiate between
cases where statement pooling is enabled or not. If true, it
means statement pooling is disabled and the statements are fully
reset, which includes a re-prepare. If false, statement
pooling is enabled, and a more lightweight reset procedure is used.SqlExceptionprotected void completeReset(boolean isDeferredReset,
boolean closeStatementsOnClose,
boolean fullReset)
throws SqlException
SqlExceptionprotected CallableLocatorProcedures locatorProcedureCall()
connection.locatorProcedureCall().blobReleaseLocator(locator);
protected void checkForClosedConnection()
throws SqlException
SqlExceptionpublic boolean isXAConnection()
public int getXAState()
public void setXAState(int state)
public void accumulateWarning(SqlWarning e)
public void accumulate440WarningForMessageProcFailure(SqlWarning e)
public void accumulate444WarningForMessageProcFailure(SqlWarning e)
public int getServerVersion()
public void setInUnitOfWork(boolean inUnitOfWork)
public Clob createClob() throws SQLException
Clob interface.
The object returned initially contains no data.createClob in interface ConnectionClob interfaceSQLException - if an object that implements the
Clob interface can not be constructed.public boolean isSingleHopEnabled()
Blob interface.
The object returned initially contains no data.Blob interfaceSQLException - if an object that implements the
Blob interface can not be constructed.public boolean cancelDisabled()
public Blob createBlob() throws SQLException
createBlob in interface ConnectionSQLExceptionpublic int incrementAndGetExecutionSequence()
Copyright © 2010-2015 Pivotal Software, Inc. All rights reserved.