public class UniversalConnectionPoolManagerMBeanImpl extends Object implements UniversalConnectionPoolManagerMBean
Modifier and Type | Method and Description |
---|---|
UniversalConnectionPoolMBean |
createConnectionPool(UniversalConnectionPoolAdapter ucpAdapter)
Creates a connection pool instance based on specified UCP Adapter.
|
void |
destroyConnectionPool(String poolName)
Destroys the connection pool.
|
UniversalConnectionPoolLifeCycleState |
getConnectionPoolLifeCycleState(String poolName)
Gets the life cycle state of the UniversalConnectionPool.
|
String[] |
getConnectionPoolNames()
Gets all the pool names managed by the UniversalConnectionPoolManager.
|
Level |
getLogLevel()
Gets the log level for the logger.
|
String |
getMBeanNameForConnectionPool(String connectionPoolName)
Gets the MBean Name for the corresponding Universal Connection Pool MBean Object.
|
int |
getMetricUpdateInterval()
Gets the metric update interval value.
|
static UniversalConnectionPoolManagerMBean |
getUniversalConnectionPoolManagerMBean()
Returns the static UniversalConnectionPoolManagerMBean instance.
|
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 |
registerUniversalConnectionPoolMBean(UniversalConnectionPoolMBean poolMBean)
Registers the UniversalConnectionPoolMBean instance with the MBean server.
|
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.
|
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 |
unregisterUniversalConnectionPoolMBean(String poolName)
Unregisters the UniversalConnectionPoolMBean from the MBean server.
|
public static UniversalConnectionPoolManagerMBean getUniversalConnectionPoolManagerMBean() throws UniversalConnectionPoolException
UniversalConnectionPoolException
- If an error occurs while getting
UniversalConnectionPoolManagerMBean.public void startConnectionPool(String poolName) throws UniversalConnectionPoolException
Starting the pool does not start metric collection for the pool.
Operation startMetricsCollection
needs to be called
to start the metric collection for the pool.
startConnectionPool
in interface UniversalConnectionPoolManagerMBean
String
- Connection pool name to find the connection pool object from pool
manager.UniversalConnectionPoolException
- If an error occurs while starting the connection pool.public void stopConnectionPool(String poolName) throws UniversalConnectionPoolException
stopConnectionPool
in interface UniversalConnectionPoolManagerMBean
String
- Connection pool name to find the connection pool object from pool
manager.UniversalConnectionPoolException
- If an error occurs while stopping the connection pool.public void refreshConnectionPool(String poolName) throws UniversalConnectionPoolException
refreshConnectionPool
in interface UniversalConnectionPoolManagerMBean
String
- Connection pool name to find the connection pool object from pool
manager.UniversalConnectionPoolException
- If an error occurs while refreshing the connection pool.public void recycleConnectionPool(String poolName) throws UniversalConnectionPoolException
recycleConnectionPool
in interface UniversalConnectionPoolManagerMBean
String
- Connection pool name to find the connection pool object from pool
manager.UniversalConnectionPoolException
- If an error occurs while recycling the connection pool.public void purgeConnectionPool(String poolName) throws UniversalConnectionPoolException
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.
purgeConnectionPool
in interface UniversalConnectionPoolManagerMBean
String
- Connection pool name to find the connection pool object from pool
manager.UniversalConnectionPoolException
- If an error occurs while purging the connection pool.public UniversalConnectionPoolMBean createConnectionPool(UniversalConnectionPoolAdapter ucpAdapter) throws UniversalConnectionPoolException
createConnectionPool
in interface UniversalConnectionPoolManagerMBean
UniversalConnectionPoolAdapter
- The UCP Adapter for pool creation.UniversalConnectionPoolException
- If an error occurs while creating the connection pool.public void destroyConnectionPool(String poolName) throws UniversalConnectionPoolException
destroyConnectionPool
in interface UniversalConnectionPoolManagerMBean
String
- Connection pool name to find the connection pool object from pool
manager.UniversalConnectionPoolException
- If an error occurs while destroying the connection pool.public 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
.reconfigureConnectionPool
in interface UniversalConnectionPoolManagerMBean
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.public String[] getConnectionPoolNames() throws UniversalConnectionPoolException
getConnectionPoolNames
in interface UniversalConnectionPoolManagerMBean
UniversalConnectionPoolException
- If an error occurs while getting the pool names from
UniversalConnectionPoolManager.public void registerUniversalConnectionPoolMBean(UniversalConnectionPoolMBean poolMBean) throws UniversalConnectionPoolException
registerUniversalConnectionPoolMBean
in interface UniversalConnectionPoolManagerMBean
UniversalConnectionPoolMBean
- UniversalConnectionPoolMBean to register in the MBeanServer.UniversalConnectionPoolException
- If an error occurs while registering
UniversalConnectionPoolMBean.public void unregisterUniversalConnectionPoolMBean(String poolName) throws UniversalConnectionPoolException
unregisterUniversalConnectionPoolMBean
in interface UniversalConnectionPoolManagerMBean
String
- Pool name to identify the UniversalConnectionPoolMBean and to
unregister it from the MBeanServer.UniversalConnectionPoolException
- If an error occurs while unregistering
UniversalConnectionPoolMBean.public void startMetricsCollection(String poolName) throws UniversalConnectionPoolException
startMetricsCollection
in interface UniversalConnectionPoolManagerMBean
String
- Connection pool name to find the connection pool object from the
pool manager.UniversalConnectionPoolException
- If an error occurs while starting metrics collection.public void stopMetricsCollection(String poolName) throws UniversalConnectionPoolException
stopMetricsCollection
in interface UniversalConnectionPoolManagerMBean
String
- Connection pool name to find the connection pool object from the
pool manager.UniversalConnectionPoolException
- If an error occurs while stopping metrics collection.public void setMetricUpdateInterval(int interval) throws UniversalConnectionPoolException
setMetricUpdateInterval
in interface UniversalConnectionPoolManagerMBean
int
- Value for metric update interval in seconds.UniversalConnectionPoolException
- If an error occurs while updating metric interval.public int getMetricUpdateInterval()
getMetricUpdateInterval
in interface UniversalConnectionPoolManagerMBean
public UniversalConnectionPoolLifeCycleState getConnectionPoolLifeCycleState(String poolName) throws UniversalConnectionPoolException
getConnectionPoolLifeCycleState
in interface UniversalConnectionPoolManagerMBean
String
- Connection pool name to find the connection pool object from
UniversalConnectionPoolManager.UniversalConnectionPoolException
- If an error occurs while getting the
UniversalConnectionPoolLifeCycleState.public void setLogLevel(Level newLogLevel)
setLogLevel
in interface UniversalConnectionPoolManagerMBean
Level
- The new log level to be set for UCP logger.public Level getLogLevel()
getLogLevel
in interface UniversalConnectionPoolManagerMBean
public String getMBeanNameForConnectionPool(String connectionPoolName) throws UniversalConnectionPoolException
getMBeanNameForConnectionPool
in interface UniversalConnectionPoolManagerMBean
String
- Connection Pool Name for which MBean Name is queriedUniversalConnectionPoolException
Copyright © 2008, 2017, Oracle. All rights reserved.