Interface ManagedExtendedConnection
-
- All Superinterfaces:
AutoCloseable,Connection,ExtendedConnection,Wrapper
public interface ManagedExtendedConnection extends ExtendedConnection
A managed extended connection extends anExtendedConnectionby 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 ManagedStatementcreateStatement()ManagedStatementcreateStatement(int resultSetType, int resultSetConcurrency)ManagedStatementcreateStatement(int resultSetType, int resultSetConcurrency, int resultSetHoldability)ManagedDatabaseMetaDatagetMetaData()intgetRemoteIteratorCount()The current amount of registered remote iterator.ManagedCallableStatementprepareCall(String sql)ManagedCallableStatementprepareCall(String sql, int resultSetType, int resultSetConcurrency)ManagedCallableStatementprepareCall(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability)ManagedPreparedStatementprepareStatement(String sql)ManagedPreparedStatementprepareStatement(String sql, int autoGeneratedKeys)ManagedPreparedStatementprepareStatement(String sql, int[] columnIndexes)ManagedPreparedStatementprepareStatement(String sql, int resultSetType, int resultSetConcurrency)ManagedPreparedStatementprepareStatement(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability)ManagedPreparedStatementprepareStatement(String sql, String[] columnNames)voidregisterRemoteIterator(RemoteIterator<?> iterator, long aliveTime)Registers the designated remote iterator to close it after the designated alive time has elapsed.voidremoteIteratorClosed(RemoteIterator<?> iterator)Signals the closing of the remote iterator.-
Methods inherited from interface java.sql.Connection
abort, beginRequest, clearWarnings, createArrayOf, createBlob, createClob, createNClob, createSQLXML, createStruct, endRequest, getAutoCommit, getCatalog, getClientInfo, getClientInfo, getHoldability, getNetworkTimeout, getSchema, getTransactionIsolation, getTypeMap, getWarnings, isClosed, isReadOnly, isValid, nativeSQL, releaseSavepoint, 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, close, columnExists, commit, createRecursionTable, createRecursionTable, createSequence, deregisterIterator, dropAllRecursionTables, dropColumn, dropRecursionTable, dropSchemaVersion, dropSequence, formatValue, getAddForeignKey, getAllTableNames, getColumnNames, getColumnType, getCorrespondingDBType, getCorrespondingDBType, getCorrespondingDBType, getCurrentTime, getDatabaseName, getDropForeignKeyConstraintKeyword, getEXCEPTKeyword, getLengthFunction, getMaxInOperatorParameterCount, getMaxParameterCount, getMaxStatementLength, getNextIdString, getSchemaVersion, getStringComparison, getTimeDifference, isForeignKeyViolation, isLockTimeout, isSyntaxError, isTableMissing, isUniqueViolation, lockTable, nextID, registerIterator, renameColumn, renameTable, rollback, 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:
createStatementin interfaceConnection- Throws:
SQLException
-
prepareStatement
ManagedPreparedStatement prepareStatement(String sql) throws SQLException
- Specified by:
prepareStatementin interfaceConnection- Specified by:
prepareStatementin interfaceExtendedConnection- Throws:
SQLException
-
prepareCall
ManagedCallableStatement prepareCall(String sql) throws SQLException
- Specified by:
prepareCallin interfaceConnection- Specified by:
prepareCallin interfaceExtendedConnection- Throws:
SQLException
-
getMetaData
ManagedDatabaseMetaData getMetaData() throws SQLException
- Specified by:
getMetaDatain interfaceConnection- Throws:
SQLException
-
createStatement
ManagedStatement createStatement(int resultSetType, int resultSetConcurrency) throws SQLException
- Specified by:
createStatementin interfaceConnection- Throws:
SQLException
-
prepareStatement
ManagedPreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency) throws SQLException
- Specified by:
prepareStatementin interfaceConnection- Specified by:
prepareStatementin interfaceExtendedConnection- Throws:
SQLException
-
prepareCall
ManagedCallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency) throws SQLException
- Specified by:
prepareCallin interfaceConnection- Specified by:
prepareCallin interfaceExtendedConnection- Throws:
SQLException
-
createStatement
ManagedStatement createStatement(int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException
- Specified by:
createStatementin interfaceConnection- Throws:
SQLException
-
prepareStatement
ManagedPreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException
- Specified by:
prepareStatementin interfaceConnection- Specified by:
prepareStatementin interfaceExtendedConnection- Throws:
SQLException
-
prepareCall
ManagedCallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException
- Specified by:
prepareCallin interfaceConnection- Specified by:
prepareCallin interfaceExtendedConnection- Throws:
SQLException
-
prepareStatement
ManagedPreparedStatement prepareStatement(String sql, int autoGeneratedKeys) throws SQLException
- Specified by:
prepareStatementin interfaceConnection- Specified by:
prepareStatementin interfaceExtendedConnection- Throws:
SQLException
-
prepareStatement
ManagedPreparedStatement prepareStatement(String sql, int[] columnIndexes) throws SQLException
- Specified by:
prepareStatementin interfaceConnection- Specified by:
prepareStatementin interfaceExtendedConnection- Throws:
SQLException
-
prepareStatement
ManagedPreparedStatement prepareStatement(String sql, String[] columnNames) throws SQLException
- Specified by:
prepareStatementin interfaceConnection- Specified by:
prepareStatementin interfaceExtendedConnection- Throws:
SQLException
-
-