public interface JDBCDataSource extends ADEPT2Service
| Modifier and Type | Method and Description |
|---|---|
ExtendedConnection |
getConnection(boolean readOnly)
Gets a read-only or writable connection to this data source.
|
ExtendedConnection |
getConnection(boolean readOnly,
int isolation)
Gets a read-only or writable connection to this data source having the
designated isolation level.
|
ExtendedConnection |
getIteratorConnection()
Similar to
getConnection(boolean) but the returned connection is intended
to be used in a potentially long-living RemoteIterator wrapping a result set. |
void |
registerRemoteIterator(RemoteIterator<?> iterator,
long aliveTime)
Registers the designated result set remote iterator to drop it after the
designated alive time has elapsed.
|
getLocalUris, getRelease, getRuntimeRequiredServices, getServiceInstanceName, getStartupRequiredServices, getURIs, init, ping, preShutdown, shutdown, startExtendedConnection getConnection(boolean readOnly) throws java.sql.SQLException
Please be aware that the maximum number of concurrent open connections may be limited, e.g. if connections are pooled and a connection limit is enforced. I.e. this method will block until a connection is available. So when more than one connection is acquired during an operation (concurrently) - within the same method or in another called method - and the number of available connections is exhausted, a deadlock may occur.
readOnly - Whether the connection should be read-only, thus allowing
more concurrency.java.sql.SQLException - If there are problems creating the connection, an
SQLException will be thrown.ExtendedConnection getConnection(boolean readOnly, int isolation) throws java.sql.SQLException
Please be aware that the maximum number of concurrent open connections may be limited, e.g. if connections are pooled and a connection limit is enforced. I.e. this method will block until a connection is available. So when more than one connection is acquired during an operation (concurrently) - within the same method or in another called method - and the number of available connections is exhausted, a deadlock may occur.
readOnly - Whether the connection should be read-only, thus allowing
more concurrency.isolation - The isolation level for the connection allowing more or
less concurrency.java.sql.SQLException - If there are problems creating the connection, this
includes requesting an isolation level that is not supported by
the underlying database system, an SQLException will
be thrown.ExtendedConnection getIteratorConnection() throws java.sql.SQLException
getConnection(boolean) but the returned connection is intended
to be used in a potentially long-living RemoteIterator wrapping a result set.
The connections are read-only and have
Connection.TRANSACTION_READ_COMMITTED.
Implementations may manage these connection differently, e.g. in a separate pool, so long-living iterators don't dry out other operations.
ResultSetRemoteIteratorsjava.sql.SQLException - if no connection could be acquiredvoid registerRemoteIterator(RemoteIterator<?> iterator, long aliveTime)
iterator - The iterator to drop after its alive time has elapsed.aliveTime - The time in milliseconds the designated iterator can be
active without being forced to be dropped.