public interface UniversalConnectionPoolManager
jmxFlag
property on
UniversalConnectionPoolManager
determines the
availability of JMX support. The default value for jmxFlag
is
true
. The jmxFlag
property is automatically set
to false
when the MBeanServer is not available.Modifier and Type | Method and Description |
---|---|
void |
createConnectionPool(UniversalConnectionPoolAdapter ucpAdapter)
Creates a connection pool instance based on specified UCP Adapter.
|
void |
destroyConnectionPool(String poolName)
Destroys the connection pool.
|
UniversalConnectionPool |
getConnectionPool(String poolName)
Gets the Universal Connection Pool instance from the Universal Connection
Pool Manager.
|
String[] |
getConnectionPoolNames()
Gets all the pool names managed by the Universal Connection Pool Manager.
|
Level |
getLogLevel()
Gets the log level for the logger.
|
int |
getMetricUpdateInterval()
Gets the metric update interval value.
|
boolean |
isJmxEnabled()
Determines the JMX availability.
|
void |
purgeConnectionPool(String poolName)
Purges the connection pool.
|
void |
reconfigureConnectionPool(String poolName,
Properties configuration)
Reconfigures the connection pool.
|
void |
recycleConnectionPool(String poolName)
Recycles the connection pool.
|
void |
refreshConnectionPool(String poolName)
Refreshes the connection pool.
|
void |
setConnectionPool(UniversalConnectionPool connectionPool)
Sets the Universal Connection Pool with
the
UniversalConnectionPoolManager Object. |
void |
setJmxEnabled(boolean jmxFlag)
Sets the
jmxFlag to either true or
false . |
void |
setLogLevel(Level newLogLevel)
Sets the log level for the UCP logger.
|
void |
setMetricUpdateInterval(int interval)
Sets the metric update interval value.
|
void |
startConnectionPool(String poolName)
Starts the connection pool instance with the given name.
|
void |
startMetricsCollection(String poolName)
Starts metric collection for the provided pool.
|
void |
stopConnectionPool(String poolName)
Stops the connection pool.
|
void |
stopMetricsCollection(String poolName)
Stops metric collection for the provided pool.
|
void startConnectionPool(String poolName) throws UniversalConnectionPoolException
startMetricsCollection
needs to be called
to start the metric collection for the pool.String
- Connection pool name for identifying the pool instance registered
with the pool manager.UniversalConnectionPoolException
- If an error occurs while starting the connection pool.void stopConnectionPool(String poolName) throws UniversalConnectionPoolException
String
- Connection pool name to find the connection pool object from the
pool manager.UniversalConnectionPoolException
- If an error occurs while stopping the connection pool.void refreshConnectionPool(String poolName) throws UniversalConnectionPoolException
poolname
as key. Pool operation is
called to refresh the connection pool.String
- Connection pool name to find the connection pool object from pool
manager.UniversalConnectionPoolException
- If an error occurs while refreshing the connection pool.void recycleConnectionPool(String poolName) throws UniversalConnectionPoolException
poolname
as key. Pool operation is
called to recycle the connection pool. This is similar to
refresh()
, but allows only invalid available connections in
the pool to be replaced with new/fresh connections.String
- Connection pool name to find the connection pool object from pool
manager.UniversalConnectionPoolException
- If an error occurs while recycling the connection pool.void purgeConnectionPool(String poolName) throws UniversalConnectionPoolException
poolname
as key. Pool operation is
called to purge the connection pool.
Removes all connections from the connection pool. The primary difference
in behavior between this and refresh()
is that the connection
pool is left empty with no connections available after calling
purge()
. Some of the connection pool properties such as
minPoolSize
or initialPoolSize
may not
be honored when purging connections from the pool.String
- Connection pool name to find the connection pool object from pool
manager.UniversalConnectionPoolException
- If an error occurs while purging the connection pool.void createConnectionPool(UniversalConnectionPoolAdapter ucpAdapter) throws UniversalConnectionPoolException
UniversalConnectionPoolAdapter
- The UCP Adapter for pool creation.UniversalConnectionPoolException
- If an error occurs while creating the connection pool.void destroyConnectionPool(String poolName) throws UniversalConnectionPoolException
poolname
as key. Pool operation is
called to stop the connection pool. Pool will be stopped and removed
from the manager.String
- Connection pool name to find the connection pool object from
the pool manager.UniversalConnectionPoolException
- If an error occurs while destroying the connection pool.void reconfigureConnectionPool(String poolName, Properties configuration) throws UniversalConnectionPoolException
poolName
as key. The following properties
are supported in the "configuration" parameter:
initialPoolSize
, minPoolSize
,
maxPoolSize
, fastConnectionFailoverEnabled
,
maxIdleTime
, maxConnectionReuseCount
,
maxConnectionReuseTime
, maxStatements
,
abandonedConnectionTimeout
,
connectionHarvestMaxCount
, timeoutCheckInterval
,
connectionHarvestTriggerCount
,
inactiveConnectionTimeout
, propertyCycle
,
connectionWaitTimeout
, validateConnectionOnBorrow
,
onsConfiguration
, sqlForValidateConnection
,
timeToLiveConnectionTimeout
, loginTimeout
,
highCostConnectionReuseThreshold
,
connectionLabelingHighCost
,
connectionAffinityCallback
,
connectionInitializationCallback
,
connectionLabelingCallback
,
secondsToTrustIdleConnection
,
connectionRepurposeThreshold
.poolName
- Connection pool name registered with the universal connection pool
manager.configuration
- the configuration input as PropertiesUniversalConnectionPoolException
- If an error occurs while reconfiguring the connection pool.void setConnectionPool(UniversalConnectionPool connectionPool) throws UniversalConnectionPoolException
UniversalConnectionPoolManager
Object. Once the pool is
stored, it can be maintained with the operations provided on the pool
manager.UniversalConnectionPool
- The UniversalConnectionPool
object to be maintained
by the Universal Connection Pool Manager.UniversalConnectionPoolException
- If an error occurs while storing the
UniversalConnectionPool
object with the
Universal Connection Pool Manager.UniversalConnectionPool getConnectionPool(String poolName) throws UniversalConnectionPoolException
String
- Connection pool name to get the Universal Connection Pool
instance.UniversalConnectionPoolException
- If an error occurs while getting the Universal
Connection Pool instance.String[] getConnectionPoolNames() throws UniversalConnectionPoolException
UniversalConnectionPoolException
- If an error occurs while getting the pool names.void startMetricsCollection(String poolName) throws UniversalConnectionPoolException
String
- Connection pool name to find the connection pool object from the
pool manager.UniversalConnectionPoolException
- If an error occurs while starting metrics collection.void stopMetricsCollection(String poolName) throws UniversalConnectionPoolException
String
- Connection pool name to find the connection pool object from the
pool manager.UniversalConnectionPoolException
- If an error occurs while stopping metrics collection.void setMetricUpdateInterval(int interval) throws UniversalConnectionPoolException
int
- Value for metric update interval in seconds.UniversalConnectionPoolException
- If an error occurs while updating metric interval.int getMetricUpdateInterval()
void setJmxEnabled(boolean jmxFlag) throws UniversalConnectionPoolException
jmxFlag
to either true
or
false
.boolean
- Flag indicating whether JMX is enabled or not.UniversalConnectionPoolException
- If an error occurs while setting jmxFlag
.boolean isJmxEnabled()
true
if JMX is enabled; otherwise false
.void setLogLevel(Level newLogLevel)
Level
- The new log level to be set for UCP logger.Level getLogLevel()
Copyright © 2008, 2016, Oracle. All rights reserved.