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 Connection
TRANSACTION_NONE, TRANSACTION_READ_COMMITTED, TRANSACTION_READ_UNCOMMITTED, TRANSACTION_REPEATABLE_READ, TRANSACTION_SERIALIZABLE -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidaddWarning(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.intintReturn prepare isolationGet the name of the current schema.booleanIs this a global transactionvoidResets the connection before it is returned from a PooledConnection to a new application request (wrapped by a BrokeredConnection).voidSet the DRDA identifier for this connection.voidsetNetworkTimeout(Executor executor, int millis) voidsetPrepareIsolation(int level) Set the transaction isolation level that will be used for the next prepare.voidSet the default schema for the Connection.Methods inherited from interface 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, setTypeMapMethods inherited from interface 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
-
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:
getSchemain interfaceConnection- Throws:
SQLException
-
setSchema
Set the default schema for the Connection.- Specified by:
setSchemain interfaceConnection- Throws:
SQLException
-
abort
- Specified by:
abortin interfaceConnection- Throws:
SQLException
-
setNetworkTimeout
- Specified by:
setNetworkTimeoutin interfaceConnection- Throws:
SQLException
-
getNetworkTimeout
- Specified by:
getNetworkTimeoutin interfaceConnection- Throws:
SQLException
-