Package org.apache.derby.iapi.jdbc
Interface EngineConnection
- All Superinterfaces:
AutoCloseable
,Connection
,Wrapper
- All Known Implementing Classes:
BrokeredConnection
,BrokeredConnection42
,EmbedConnection
Additional 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.
-
Field Summary
Fields inherited from interface java.sql.Connection
TRANSACTION_NONE, TRANSACTION_READ_COMMITTED, TRANSACTION_READ_UNCOMMITTED, TRANSACTION_REPEATABLE_READ, TRANSACTION_SERIALIZABLE
-
Method Summary
Modifier and TypeMethodDescriptionvoid
void
addWarning
(SQLWarning newWarning) Add a SQLWarning to this Connection object.Obtain the name of the current schema, so that the NetworkServer can use it for piggy-backinggetLOBMapping
(int key) Get the LOB reference corresponding to the locator.int
int
Return prepare isolationGet the name of the current schema.boolean
Is this a global transactionvoid
Resets the connection before it is returned from a PooledConnection to a new application request (wrapped by a BrokeredConnection).void
Set the DRDA identifier for this connection.void
setNetworkTimeout
(Executor executor, int millis) void
setPrepareIsolation
(int level) Set the transaction isolation level that will be used for the next prepare.void
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
Methods inherited from interface java.sql.Wrapper
isWrapperFor, unwrap
-
Method Details
-
setDrdaID
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
Set 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:
SQLException
-
getPrepareIsolation
Return prepare isolation- Throws:
SQLException
-
addWarning
Add a SQLWarning to this Connection object.- Parameters:
newWarning
- Warning to be added, will be chained to any existing warnings.- Throws:
SQLException
-
getLOBMapping
Get 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:
SQLException
-
getCurrentSchemaName
Obtain the name of the current schema, so that the NetworkServer can use it for piggy-backing- Returns:
- the current schema name
- Throws:
SQLException
-
resetFromPool
Resets 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:
SQLException
-
getSchema
Get the name of the current schema.- Specified by:
getSchema
in interfaceConnection
- Throws:
SQLException
-
setSchema
Set the default schema for the Connection.- Specified by:
setSchema
in interfaceConnection
- Throws:
SQLException
-
abort
- Specified by:
abort
in interfaceConnection
- Throws:
SQLException
-
setNetworkTimeout
- Specified by:
setNetworkTimeout
in interfaceConnection
- Throws:
SQLException
-
getNetworkTimeout
- Specified by:
getNetworkTimeout
in interfaceConnection
- Throws:
SQLException
-