Interface ManagedExtendedConnection
-
- All Superinterfaces:
AutoCloseable
,Connection
,ExtendedConnection
,Wrapper
public interface ManagedExtendedConnection extends ExtendedConnection
A managed extended connection extends anExtendedConnection
by the means to handle remote iterator. This is closely coupled to a transaction managed by aTxManager
.
-
-
Field Summary
-
Fields inherited from interface java.sql.Connection
TRANSACTION_NONE, TRANSACTION_READ_COMMITTED, TRANSACTION_READ_UNCOMMITTED, TRANSACTION_REPEATABLE_READ, TRANSACTION_SERIALIZABLE
-
Fields inherited from interface de.aristaflow.adept2.base.dbaccess.ExtendedConnection
DEFAULT_MAX_IN_OPERATOR_PARAMETER_COUNT, DEFAULT_MAX_PARAMETER_COUNT, DEFAULT_MAX_STATEMENT_LENGTH
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ManagedStatement
createStatement()
ManagedStatement
createStatement(int resultSetType, int resultSetConcurrency)
ManagedStatement
createStatement(int resultSetType, int resultSetConcurrency, int resultSetHoldability)
ManagedDatabaseMetaData
getMetaData()
int
getRemoteIteratorCount()
The current amount of registered remote iterator.ManagedCallableStatement
prepareCall(String sql)
ManagedCallableStatement
prepareCall(String sql, int resultSetType, int resultSetConcurrency)
ManagedCallableStatement
prepareCall(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability)
ManagedPreparedStatement
prepareStatement(String sql)
ManagedPreparedStatement
prepareStatement(String sql, int autoGeneratedKeys)
ManagedPreparedStatement
prepareStatement(String sql, int[] columnIndexes)
ManagedPreparedStatement
prepareStatement(String sql, int resultSetType, int resultSetConcurrency)
ManagedPreparedStatement
prepareStatement(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability)
ManagedPreparedStatement
prepareStatement(String sql, String[] columnNames)
void
registerRemoteIterator(RemoteIterator<?> iterator, long aliveTime)
Registers the designated remote iterator to close it after the designated alive time has elapsed.void
remoteIteratorClosed(RemoteIterator<?> iterator)
Signals the closing of the remote iterator.-
Methods inherited from interface java.sql.Connection
abort, beginRequest, clearWarnings, close, commit, createArrayOf, createBlob, createClob, createNClob, createSQLXML, createStruct, endRequest, getAutoCommit, getCatalog, getClientInfo, getClientInfo, getHoldability, getNetworkTimeout, getSchema, getTransactionIsolation, getTypeMap, getWarnings, isClosed, isReadOnly, isValid, nativeSQL, releaseSavepoint, rollback, rollback, setAutoCommit, setCatalog, setClientInfo, setClientInfo, setHoldability, setNetworkTimeout, setReadOnly, setSavepoint, setSavepoint, setSchema, setShardingKey, setShardingKey, setShardingKeyIfValid, setShardingKeyIfValid, setTransactionIsolation, setTypeMap
-
Methods inherited from interface de.aristaflow.adept2.base.dbaccess.ExtendedConnection
addColumn, columnExists, createRecursionTable, createRecursionTable, createSequence, deregisterIterator, dropAllRecursionTables, dropColumn, dropRecursionTable, dropSchemaVersion, dropSequence, formatValue, getAddForeignKey, getAllTableNames, getColumnNames, getColumnType, getCorrespondingDBType, getCorrespondingDBType, getCorrespondingDBType, getCurrentTime, getDatabaseName, getDropForeignKeyConstraintKeyword, getEXCEPTKeyword, getMaxInOperatorParameterCount, getMaxParameterCount, getMaxStatementLength, getNextIdString, getSchemaVersion, getStringComparison, getTimeDifference, isForeignKeyViolation, isLockTimeout, isSyntaxError, isTableMissing, isUniqueViolation, lockTable, nextID, registerIterator, renameColumn, renameTable, sequenceExists, setDefaultLockTimeout, setLockTimeout, setSchemaVersion, supportsIntersect, supportsSqlXml, tableExists, toUpperCase, updateColumnDefault, updateColumnsNullable, updateColumnsType, updateColumnType, useLockTimeout
-
Methods inherited from interface java.sql.Wrapper
isWrapperFor, unwrap
-
-
-
-
Method Detail
-
registerRemoteIterator
void registerRemoteIterator(RemoteIterator<?> iterator, long aliveTime)
Registers the designated remote iterator to close it after the designated alive time has elapsed. The iterator can be safely closed beforehand and signal this viaremoteIteratorClosed(RemoteIterator)
.- Parameters:
iterator
- The iterator to close after its alive time has elapsed.aliveTime
- The time in milliseconds the designated iterator can be active without being forced to be closed.
-
getRemoteIteratorCount
int getRemoteIteratorCount()
The current amount of registered remote iterator. The wrapped connection must not be closed until all remote iterator have been closed.- Returns:
- The current amount of registered remote iterator.
-
remoteIteratorClosed
void remoteIteratorClosed(RemoteIterator<?> iterator)
Signals the closing of the remote iterator. As soon as all remote iterator of this connection are closed, the underlying connection will be closed.- Parameters:
iterator
- The remote iterator that has been closed.
-
createStatement
ManagedStatement createStatement() throws SQLException
- Specified by:
createStatement
in interfaceConnection
- Throws:
SQLException
-
prepareStatement
ManagedPreparedStatement prepareStatement(String sql) throws SQLException
- Specified by:
prepareStatement
in interfaceConnection
- Specified by:
prepareStatement
in interfaceExtendedConnection
- Throws:
SQLException
-
prepareCall
ManagedCallableStatement prepareCall(String sql) throws SQLException
- Specified by:
prepareCall
in interfaceConnection
- Specified by:
prepareCall
in interfaceExtendedConnection
- Throws:
SQLException
-
getMetaData
ManagedDatabaseMetaData getMetaData() throws SQLException
- Specified by:
getMetaData
in interfaceConnection
- Throws:
SQLException
-
createStatement
ManagedStatement createStatement(int resultSetType, int resultSetConcurrency) throws SQLException
- Specified by:
createStatement
in interfaceConnection
- Throws:
SQLException
-
prepareStatement
ManagedPreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency) throws SQLException
- Specified by:
prepareStatement
in interfaceConnection
- Specified by:
prepareStatement
in interfaceExtendedConnection
- Throws:
SQLException
-
prepareCall
ManagedCallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency) throws SQLException
- Specified by:
prepareCall
in interfaceConnection
- Specified by:
prepareCall
in interfaceExtendedConnection
- Throws:
SQLException
-
createStatement
ManagedStatement createStatement(int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException
- Specified by:
createStatement
in interfaceConnection
- Throws:
SQLException
-
prepareStatement
ManagedPreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException
- Specified by:
prepareStatement
in interfaceConnection
- Specified by:
prepareStatement
in interfaceExtendedConnection
- Throws:
SQLException
-
prepareCall
ManagedCallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException
- Specified by:
prepareCall
in interfaceConnection
- Specified by:
prepareCall
in interfaceExtendedConnection
- Throws:
SQLException
-
prepareStatement
ManagedPreparedStatement prepareStatement(String sql, int autoGeneratedKeys) throws SQLException
- Specified by:
prepareStatement
in interfaceConnection
- Specified by:
prepareStatement
in interfaceExtendedConnection
- Throws:
SQLException
-
prepareStatement
ManagedPreparedStatement prepareStatement(String sql, int[] columnIndexes) throws SQLException
- Specified by:
prepareStatement
in interfaceConnection
- Specified by:
prepareStatement
in interfaceExtendedConnection
- Throws:
SQLException
-
prepareStatement
ManagedPreparedStatement prepareStatement(String sql, String[] columnNames) throws SQLException
- Specified by:
prepareStatement
in interfaceConnection
- Specified by:
prepareStatement
in interfaceExtendedConnection
- Throws:
SQLException
-
-