public abstract class UniversalConnectionPoolManagerBase extends Object implements UniversalConnectionPoolManager
| Modifier and Type | Class and Description |
|---|---|
static class |
UniversalConnectionPoolManagerBase.UCPMetric |
| Modifier and Type | Field and Description |
|---|---|
protected Map<String,UniversalConnectionPool> |
m_connPool |
protected Map<String,String> |
m_mappedPoolNames |
| Constructor and Description |
|---|
UniversalConnectionPoolManagerBase() |
| 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 UniversalConnectionPool from UniversalConnectionPoolManager
Object.
|
String[] |
getConnectionPoolNames()
Gets all the pool names managed by the UniversalConnectionPoolManager.
|
Level |
getLogLevel()
Gets the log level for UCP logger.
|
protected String |
getManagerPoolID(String poolName)
Gets the uniquePoolID for a provided poolName from the
UniversalConnectionPoolManager.
|
int |
getMetricUpdateInterval()
Gets the metric update interval value.
|
protected oracle.dms.instrument.StateIntf |
getStateMetric(String poolName,
UniversalConnectionPoolManagerBase.UCPMetric ucpMetric)
Gets the StateMetric for the requested pool.
|
static TaskManager |
getTaskManager()
Gets the Task Manager.
|
static TimerManager |
getTimerManager()
Gets the Timer Manager.
|
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 UniversalConnectionPool with UniversalConnectionPoolManager
Object.
|
void |
setJmxEnabled(boolean jmxFlag)
Sets the jmxFlag to true/false.
|
void |
setLogLevel(Level newLogLevel)
Sets the log level for the UCP logger.
|
protected void |
setManagerPoolID(String poolName,
String newPoolName)
Changes the pool mapping for the provided pool in
UniversalConnectionPoolManager Object.
|
protected void |
setMetricConsole(oracle.dms.console.DMSConsole metricConsole)
Sets the MetricConsole for UCP metrics collection.
|
protected void |
setMetricParentNoun(String poolName,
oracle.dms.instrument.NounIntf metricParentNoun)
Sets the Parent Noun for the provided pool to gather UCP metrics.
|
void |
setMetricUpdateInterval(int metricInterval)
Sets the metric update interval value.
|
static boolean |
setTaskManager(TaskManager taskManager)
Sets a new Task Manager.
|
static boolean |
setTimerManager(TimerManager timerManager)
Sets new Timer Manager
All running timers must be stopped
prior to replacing a timer manager.
|
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.
|
protected final Map<String,UniversalConnectionPool> m_connPool
public void startConnectionPool(String poolName) throws UniversalConnectionPoolException
startMetricsCollection needs to be called
to start the metric collection for the pool.startConnectionPool in interface UniversalConnectionPoolManagerString - 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 UniversalConnectionPoolManagerString - 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 UniversalConnectionPoolManagerString - 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 UniversalConnectionPoolManagerString - 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 UniversalConnectionPoolManagerString - Connection pool name to find the connection pool object from pool
manager.UniversalConnectionPoolException - If an error occurs while purging the connection pool.public void destroyConnectionPool(String poolName) throws UniversalConnectionPoolException
destroyConnectionPool in interface UniversalConnectionPoolManagerString - 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 UniversalConnectionPoolManagerpoolName - 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 void createConnectionPool(UniversalConnectionPoolAdapter ucpAdapter) throws UniversalConnectionPoolException
createConnectionPool in interface UniversalConnectionPoolManagerUniversalConnectionPoolAdapter - The UCP Adapter for pool creation.UniversalConnectionPoolException - If an error occurs while creating the connection pool.public void setConnectionPool(UniversalConnectionPool connectionPool) throws UniversalConnectionPoolException
setConnectionPool in interface UniversalConnectionPoolManagerUniversalConnectionPool - UniversalConnectionPool object to be maintained by
UniversalConnectionPoolManager.UniversalConnectionPoolException - If an error occurs while storing UniversalConnectionPool with
UniversalConnectionPoolManager.public UniversalConnectionPool getConnectionPool(String poolName) throws UniversalConnectionPoolException
getConnectionPool in interface UniversalConnectionPoolManagerString - Connection pool name to get UniversalConnectionPool from
UniversalConnectionPoolManager.UniversalConnectionPoolException - If an error occurs while getting UniversalConnectionPool from
UniversalConnectionPoolManager.public String[] getConnectionPoolNames() throws UniversalConnectionPoolException
getConnectionPoolNames in interface UniversalConnectionPoolManagerUniversalConnectionPoolException - If an error occurs while getting the pool names from
UniversalConnectionPoolManager.protected void setManagerPoolID(String poolName, String newPoolName) throws UniversalConnectionPoolException
String - poolName that needs to be changed.String - poolName that needs to be assigned.UniversalConnectionPoolException - If an error occurs while changing the mapped Pool ID in the
UniversalConnectionPoolManager.protected String getManagerPoolID(String poolName) throws UniversalConnectionPoolException
String - Connection pool name to get uniquePoolID from
UniversalConnectionPoolManager.UniversalConnectionPoolException - If an error occurs while getting mapped pool ID from
UniversalConnectionPoolManager.public void startMetricsCollection(String poolName) throws UniversalConnectionPoolException
startMetricsCollection in interface UniversalConnectionPoolManagerString - Connection pool name to find the connection pool object from pool
manager.UniversalConnectionPoolException - If an error occurs while starting metrics collection.public void stopMetricsCollection(String poolName) throws UniversalConnectionPoolException
stopMetricsCollection in interface UniversalConnectionPoolManagerString - Connection pool name to find the connection pool object from pool
manager.UniversalConnectionPoolException - If an error occurs while stopping metrics collection.public void setMetricUpdateInterval(int metricInterval)
throws UniversalConnectionPoolException
setMetricUpdateInterval in interface UniversalConnectionPoolManagerint - Value for metric update interval in seconds.UniversalConnectionPoolException - If an error occurs while updating metric interval.public int getMetricUpdateInterval()
getMetricUpdateInterval in interface UniversalConnectionPoolManagerpublic void setJmxEnabled(boolean jmxFlag)
throws UniversalConnectionPoolException
setJmxEnabled in interface UniversalConnectionPoolManagerboolean - Flag to know if JMX is enabled or not.UniversalConnectionPoolException - If an error occurs while setting jmxFlag.public boolean isJmxEnabled()
isJmxEnabled in interface UniversalConnectionPoolManagerpublic void setLogLevel(Level newLogLevel)
setLogLevel in interface UniversalConnectionPoolManagerLevel - The new log level to be set for UCP logger.public Level getLogLevel()
getLogLevel in interface UniversalConnectionPoolManagerprotected void setMetricConsole(oracle.dms.console.DMSConsole metricConsole)
DMSConsole - Console to be set for UCP metrics collection.protected void setMetricParentNoun(String poolName, oracle.dms.instrument.NounIntf metricParentNoun)
String - poolName for the Metric parent noun.NounIntf - Metric parent noun to assign to a connection pool.protected oracle.dms.instrument.StateIntf getStateMetric(String poolName, UniversalConnectionPoolManagerBase.UCPMetric ucpMetric)
String - poolName to get the UCPMetric.public static TimerManager getTimerManager()
public static boolean setTimerManager(TimerManager timerManager)
timerManager - new timer manager object to set.public static TaskManager getTaskManager()
public static boolean setTaskManager(TaskManager taskManager)
taskManager - new task manager object to set.
Copyright © 2008, 2016, Oracle. All rights reserved.