Skip navigation links

Oracle® Universal Connection Pool for JDBC Java API Reference
12c Release 1 (12.1)

E17662-07


oracle.ucp.admin
Interface UniversalConnectionPoolManager

All Known Implementing Classes:
oracle.ucp.admin.UniversalConnectionPoolManagerBase, UniversalConnectionPoolManagerImpl

public interface UniversalConnectionPoolManager

The UniversalConnectionPoolManager interface defines operations for creating and maintaining the Universal Connection Pool instances. A pool instance is registered with the pool manager every time a new pool is created. All the pool operations can be called by providing the pool name as a key. Operations for controlling the metric collection for individual Universal Connection Pool instances are also provided.

The 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.


Method Summary
 void createConnectionPool(UniversalConnectionPoolAdapter ucpAdapter)
          Creates a connection pool instance based on specified UCP Adapter.
 void destroyConnectionPool(java.lang.String poolName)
          Destroys the connection pool.
 UniversalConnectionPool getConnectionPool(java.lang.String poolName)
          Gets the Universal Connection Pool instance from the Universal Connection Pool Manager.
 java.lang.String[] getConnectionPoolNames()
          Gets all the pool names managed by the Universal Connection Pool Manager.
 java.util.logging.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(java.lang.String poolName)
          Purges the connection pool.
 void recycleConnectionPool(java.lang.String poolName)
          Recycles the connection pool.
 void refreshConnectionPool(java.lang.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(java.util.logging.Level newLogLevel)
          Sets the log level for the UCP logger.
 void setMetricUpdateInterval(int interval)
          Sets the metric update interval value.
 void startConnectionPool(java.lang.String poolName)
          Starts the connection pool instance with the given name.
 void startMetricsCollection(java.lang.String poolName)
          Starts metric collection for the provided pool.
 void stopConnectionPool(java.lang.String poolName)
          Stops the connection pool.
 void stopMetricsCollection(java.lang.String poolName)
          Stops metric collection for the provided pool.

 

Method Detail

startConnectionPool

void startConnectionPool(java.lang.String poolName)
                         throws UniversalConnectionPoolException
Starts the connection pool instance with the given name.

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.

Parameters:
String - Connection pool name for identifying the pool instance registered with the pool manager.
Throws:
UniversalConnectionPoolException - If an error occurs while starting the connection pool.

stopConnectionPool

void stopConnectionPool(java.lang.String poolName)
                        throws UniversalConnectionPoolException
Stops the connection pool. Connection pool object is obtained from the manager by providing pool name as key. Pool operation is called to stop the connection pool. Stops the metric collection if it is already started.
Parameters:
String - Connection pool name to find the connection pool object from the pool manager.
Throws:
UniversalConnectionPoolException - If an error occurs while stopping the connection pool.

refreshConnectionPool

void refreshConnectionPool(java.lang.String poolName)
                           throws UniversalConnectionPoolException
Refreshes the connection pool. Connection pool object is obtained from the manager by providing poolname as key. Pool operation is called to refresh the connection pool.
Parameters:
String - Connection pool name to find the connection pool object from pool manager.
Throws:
UniversalConnectionPoolException - If an error occurs while refreshing the connection pool.

recycleConnectionPool

void recycleConnectionPool(java.lang.String poolName)
                           throws UniversalConnectionPoolException
Recycles the connection pool. Connection pool object is obtained from the manager by providing 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.
Parameters:
String - Connection pool name to find the connection pool object from pool manager.
Throws:
UniversalConnectionPoolException - If an error occurs while recycling the connection pool.

purgeConnectionPool

void purgeConnectionPool(java.lang.String poolName)
                         throws UniversalConnectionPoolException
Purges the connection pool. Connection pool object is obtained from the manager by providing 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.

Parameters:
String - Connection pool name to find the connection pool object from pool manager.
Throws:
UniversalConnectionPoolException - If an error occurs while purging the connection pool.

createConnectionPool

void createConnectionPool(UniversalConnectionPoolAdapter ucpAdapter)
                          throws UniversalConnectionPoolException
Creates a connection pool instance based on specified UCP Adapter. Pool and connection factory configuration properties should be set on the Adapter prior to invoking this method. The created pool instance will be added to this UCP manager.
Parameters:
UniversalConnectionPoolAdapter - The UCP Adapter for pool creation.
Throws:
UniversalConnectionPoolException - If an error occurs while creating the connection pool.

destroyConnectionPool

void destroyConnectionPool(java.lang.String poolName)
                           throws UniversalConnectionPoolException
Destroys the connection pool. The connection pool is obtained from the manager by providing poolname as key. Pool operation is called to stop the connection pool. Pool will be stopped and removed from the manager.
Parameters:
String - Connection pool name to find the connection pool object from the pool manager.
Throws:
UniversalConnectionPoolException - If an error occurs while destroying the connection pool.

setConnectionPool

void setConnectionPool(UniversalConnectionPool connectionPool)
                       throws UniversalConnectionPoolException
Sets the Universal Connection Pool with the UniversalConnectionPoolManager Object. Once the pool is stored, it can be maintained with the operations provided on the pool manager.
Parameters:
UniversalConnectionPool - The UniversalConnectionPool object to be maintained by the Universal Connection Pool Manager.
Throws:
UniversalConnectionPoolException - If an error occurs while storing the UniversalConnectionPool object with the Universal Connection Pool Manager.

getConnectionPool

UniversalConnectionPool getConnectionPool(java.lang.String poolName)
                                          throws UniversalConnectionPoolException
Gets the Universal Connection Pool instance from the Universal Connection Pool Manager.
Parameters:
String - Connection pool name to get the Universal Connection Pool instance.
Throws:
UniversalConnectionPoolException - If an error occurs while getting the Universal Connection Pool instance.

getConnectionPoolNames

java.lang.String[] getConnectionPoolNames()
                                          throws UniversalConnectionPoolException
Gets all the pool names managed by the Universal Connection Pool Manager.
Returns:
String[] List of connection pool names, returned as an Array.
Throws:
UniversalConnectionPoolException - If an error occurs while getting the pool names.

startMetricsCollection

void startMetricsCollection(java.lang.String poolName)
                            throws UniversalConnectionPoolException
Starts metric collection for the provided pool.
Parameters:
String - Connection pool name to find the connection pool object from the pool manager.
Throws:
UniversalConnectionPoolException - If an error occurs while starting metrics collection.

stopMetricsCollection

void stopMetricsCollection(java.lang.String poolName)
                           throws UniversalConnectionPoolException
Stops metric collection for the provided pool.
Parameters:
String - Connection pool name to find the connection pool object from the pool manager.
Throws:
UniversalConnectionPoolException - If an error occurs while stopping metrics collection.

setMetricUpdateInterval

void setMetricUpdateInterval(int interval)
                             throws UniversalConnectionPoolException
Sets the metric update interval value.
Parameters:
int - Value for metric update interval in seconds.
Throws:
UniversalConnectionPoolException - If an error occurs while updating metric interval.

getMetricUpdateInterval

int getMetricUpdateInterval()
Gets the metric update interval value.
Returns:
The metric update interval in seconds.

setJmxEnabled

void setJmxEnabled(boolean jmxFlag)
                   throws UniversalConnectionPoolException
Sets the jmxFlag to either true or false.
Parameters:
boolean - Flag indicating whether JMX is enabled or not.
Throws:
UniversalConnectionPoolException - If an error occurs while setting jmxFlag.

isJmxEnabled

boolean isJmxEnabled()
Determines the JMX availability.
Returns:
true if JMX is enabled; otherwise false.

setLogLevel

void setLogLevel(java.util.logging.Level newLogLevel)
Sets the log level for the UCP logger.
Parameters:
Level - The new log level to be set for UCP logger.

getLogLevel

java.util.logging.Level getLogLevel()
Gets the log level for the logger.
Returns:
Level Returns the Level object for the Logger.

Skip navigation links

Oracle® Universal Connection Pool for JDBC Java API Reference
12c Release 1 (12.1)

E17662-07


Copyright © 2007, 2013, Oracle and/or its affiliates. All rights reserved.