Package org.apache.derby.iapi.jdbc
Interface EngineConnection
-
- All Superinterfaces:
java.lang.AutoCloseable,java.sql.Connection,java.sql.Wrapper
- All Known Implementing Classes:
BrokeredConnection,BrokeredConnection42,EmbedConnection
public interface EngineConnection extends java.sql.ConnectionAdditional methods the embedded engine exposes on its Connection object implementations. An internal api only, mainly for the network server. Allows consistent interaction between EmbedConnections and BrokeredConnections.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidabort(java.util.concurrent.Executor executor)voidaddWarning(java.sql.SQLWarning newWarning)Add a SQLWarning to this Connection object.java.lang.StringgetCurrentSchemaName()Obtain the name of the current schema, so that the NetworkServer can use it for piggy-backingjava.lang.ObjectgetLOBMapping(int key)Get the LOB reference corresponding to the locator.intgetNetworkTimeout()intgetPrepareIsolation()Return prepare isolationjava.lang.StringgetSchema()Get the name of the current schema.booleanisInGlobalTransaction()Is this a global transactionvoidresetFromPool()Resets the connection before it is returned from a PooledConnection to a new application request (wrapped by a BrokeredConnection).voidsetDrdaID(java.lang.String drdaID)Set the DRDA identifier for this connection.voidsetNetworkTimeout(java.util.concurrent.Executor executor, int millis)voidsetPrepareIsolation(int level)Set the transaction isolation level that will be used for the next prepare.voidsetSchema(java.lang.String schemaName)Set the default schema for the Connection.-
Methods inherited from interface java.sql.Connection
beginRequest, clearWarnings, close, commit, createArrayOf, createBlob, createClob, createNClob, createSQLXML, createStatement, createStatement, createStatement, createStruct, endRequest, getAutoCommit, getCatalog, getClientInfo, getClientInfo, getHoldability, getMetaData, getTransactionIsolation, getTypeMap, getWarnings, isClosed, isReadOnly, isValid, nativeSQL, prepareCall, prepareCall, prepareCall, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, releaseSavepoint, rollback, rollback, setAutoCommit, setCatalog, setClientInfo, setClientInfo, setHoldability, setReadOnly, setSavepoint, setSavepoint, setShardingKey, setShardingKey, setShardingKeyIfValid, setShardingKeyIfValid, setTransactionIsolation, setTypeMap
-
-
-
-
Method Detail
-
setDrdaID
void setDrdaID(java.lang.String drdaID)
Set the DRDA identifier for this connection.
-
isInGlobalTransaction
boolean isInGlobalTransaction()
Is this a global transaction- Returns:
- true if this is a global XA transaction
-
setPrepareIsolation
void setPrepareIsolation(int level) throws java.sql.SQLExceptionSet the transaction isolation level that will be used for the next prepare. Used by network server to implement DB2 style isolation levels. Note the passed in level using the Derby constants from ExecutionContext and not the JDBC constants from java.sql.Connection.- Parameters:
level- Isolation level to change to. level is the DB2 level specified in the package names which happen to correspond to our internal levels. If level == ExecutionContext.UNSPECIFIED_ISOLATION, the statement won't be prepared with an isolation level.- Throws:
java.sql.SQLException
-
getPrepareIsolation
int getPrepareIsolation() throws java.sql.SQLExceptionReturn prepare isolation- Throws:
java.sql.SQLException
-
addWarning
void addWarning(java.sql.SQLWarning newWarning) throws java.sql.SQLExceptionAdd a SQLWarning to this Connection object.- Parameters:
newWarning- Warning to be added, will be chained to any existing warnings.- Throws:
java.sql.SQLException
-
getLOBMapping
java.lang.Object getLOBMapping(int key) throws java.sql.SQLExceptionGet the LOB reference corresponding to the locator.- Parameters:
key- the integer that represents the LOB locator value.- Returns:
- the LOB Object corresponding to this locator.
- Throws:
java.sql.SQLException
-
getCurrentSchemaName
java.lang.String getCurrentSchemaName() throws java.sql.SQLExceptionObtain the name of the current schema, so that the NetworkServer can use it for piggy-backing- Returns:
- the current schema name
- Throws:
java.sql.SQLException
-
resetFromPool
void resetFromPool() throws java.sql.SQLExceptionResets the connection before it is returned from a PooledConnection to a new application request (wrapped by a BrokeredConnection).Note that resetting the transaction isolation level is not performed as part of this method. Temporary tables, IDENTITY_VAL_LOCAL and current schema are reset.
- Throws:
java.sql.SQLException
-
getSchema
java.lang.String getSchema() throws java.sql.SQLExceptionGet the name of the current schema.- Specified by:
getSchemain interfacejava.sql.Connection- Throws:
java.sql.SQLException
-
setSchema
void setSchema(java.lang.String schemaName) throws java.sql.SQLExceptionSet the default schema for the Connection.- Specified by:
setSchemain interfacejava.sql.Connection- Throws:
java.sql.SQLException
-
abort
void abort(java.util.concurrent.Executor executor) throws java.sql.SQLException- Specified by:
abortin interfacejava.sql.Connection- Throws:
java.sql.SQLException
-
setNetworkTimeout
void setNetworkTimeout(java.util.concurrent.Executor executor, int millis) throws java.sql.SQLException- Specified by:
setNetworkTimeoutin interfacejava.sql.Connection- Throws:
java.sql.SQLException
-
getNetworkTimeout
int getNetworkTimeout() throws java.sql.SQLException- Specified by:
getNetworkTimeoutin interfacejava.sql.Connection- Throws:
java.sql.SQLException
-
-