public interface ConnectionPool extends SubService
Modifier and Type | Method and Description |
---|---|
LibraryConnection |
acquireLibraryConnection()
Gets a LibraryConnection from this ConnectionPool.
|
void |
dispose()
Shuts down this ConnectionPool.
|
void |
dispose(boolean force)
Shuts down this ConnectionPool.
|
ConnectionPoolConfiguration |
getConnectionPoolConfiguration()
Gets the configuration parameters of this ConnectionPool.
|
ConnectionPoolPerformance |
getConnectionPoolPerformance()
Gets the performance information for this ConnectionPool.
|
void |
initialize(S_LibraryService service,
ConnectionPoolConfiguration configuration)
Initializes a ConnectionPool.
|
void |
releaseLibraryConnection(LibraryConnection lconn)
Releases the specified LibraryConnection back to this ConnectionPool.
|
void |
resetCachedStatements()
Resets the cached statements in all LibraryConnections.
|
void |
resetStatistics()
Resets the performance statistics of this ConnectionPool.
|
void |
setConnectionPoolConfiguration(ConnectionPoolConfiguration config)
Alters the configuration of this ConnectionPool.
|
void |
validateUnallocatedConnections()
Validates the unallocated connections.
|
void initialize(S_LibraryService service, ConnectionPoolConfiguration configuration) throws IfsException
Is invoked immediately after construction to provide the service and configuration context for this pool.
service
- the S_LibraryService creating this
ConnectionPoolconfiguration
- the ConnectionPool configuration
parametersIfsException
- ConnectionPoolConfiguration getConnectionPoolConfiguration() throws IfsException
This method returns a copy of the configuration parameters for this
ConnectionPool. To alter the configuration of this ConnectionPool,
use the ConnectionPoolConfiguration mutators to adjust the values of
these parameters and then call setConnectionPoolConfiguration
to apply the altered ConnectionPoolConfiguration.
The database URL, schema name, and schema password are not included in the returned parameters.
IfsException
- void setConnectionPoolConfiguration(ConnectionPoolConfiguration config) throws IfsException
The following configuration parameters can be changed using this method:
All other configuration parameters specified in the ConnectionPoolConfiguration are ignored.
config
- the configuration parametersIfsException
- LibraryConnection acquireLibraryConnection() throws IfsException
IfsException
- void releaseLibraryConnection(LibraryConnection lconn) throws IfsException
lconn
- the connection to releaseIfsException
- ConnectionPoolPerformance getConnectionPoolPerformance() throws IfsException
IfsException
- void resetStatistics() throws IfsException
IfsException
- void validateUnallocatedConnections() throws IfsException
IfsException
- if the operation failsvoid dispose(boolean force) throws IfsException
force
- whether to perform a forced shutdown,
closing in-use connectionsIfsException
- void dispose() throws IfsException
Equivalent to dispose(true)
.
dispose
in interface SubService
IfsException
- void resetCachedStatements() throws IfsException
IfsException
- if the operation failsCopyright © 2023. All rights reserved.