public interface UniversalConnectionPoolManagerMBean
There is only one Universal Connection Pool Manager MBean for a JVM and this is registered with an MBeanServer.
All the operations implemented on the pool manager MBean are called only
when jmxFlag on the pool manager is set to true.
Default value for jmxFlag is true. When the
MBeanServer is not available, jmxFlag is automatically set
to false.
| Modifier and Type | Method and Description |
|---|---|
UniversalConnectionPoolMBean |
createConnectionPool(UniversalConnectionPoolAdapter ucpAdapter)
Creates a connection pool instance based on specified UCP Adapter.
|
void |
destroyConnectionPool(java.lang.String poolName)
Destroys the connection pool.
|
java.lang.String |
diagnosticsSummaryPrintout()
Gets the diagnostics printout.
|
void |
dumpTraceBuffer()
Dump in-memory trace buffer to the target handler.
|
java.lang.Integer |
getBufferSize()
Get in-memory trace buffer size.
|
UniversalConnectionPoolLifeCycleState |
getConnectionPoolLifeCycleState(java.lang.String poolName)
Gets the life cycle state of the Universal Connection Pool.
|
java.lang.String[] |
getConnectionPoolNames()
Gets all the pool names managed by the Universal Connection Pool Manager.
|
java.lang.String |
getErrorCodesToWatchList()
Get a string containing comma separated error codes that will trigger
dumping of the in-memory traces in the configured log handler when
a UCP error with the given error code occurs.
|
java.lang.String |
getLoggingConfigFile()
Get a string containing logging config file.
|
java.lang.Boolean |
getLoggingEnabled()
Is logging enabled?
|
java.util.logging.Level |
getLogLevel()
Get a current logging level.
|
java.lang.String |
getLogLevelStr() |
java.lang.String |
getMBeanNameForConnectionPool(java.lang.String connectionPoolName)
Gets the MBean Name for the corresponding Universal Connection Pool MBean Object.
|
java.lang.Integer |
getMetricUpdateInterval()
Gets the metric update interval value.
|
java.lang.Boolean |
getTraceEnabled()
Is tracing enabled?
|
void |
purgeConnectionPool(java.lang.String poolName)
Purges the connection pool.
|
void |
reconfigureConnectionPool(java.lang.String poolName,
java.util.Properties configuration)
Reconfigures the connection pool.
|
void |
recycleConnectionPool(java.lang.String poolName)
Recycles the connection pool.
|
void |
refreshConnectionPool(java.lang.String poolName)
Refreshes the connection pool.
|
void |
registerUniversalConnectionPoolMBean(UniversalConnectionPoolMBean poolMBean)
Registers the Universal Connection Pool MBean instance with the MBean
server.
|
void |
setBufferSize(java.lang.Integer bufferSize)
Set in-memory trace buffer size.
|
void |
setErrorCodesToWatchList(java.lang.String errorCodesToWatchList)
Set a string containing comma separated error codes that will trigger
dumping of the in-memory traces in the configured log handler when
a UCP error with the given error code occurs.
|
void |
setLoggingConfigFile(java.lang.String loggingConfigFile)
Set a string containing logging config file.
|
void |
setLoggingEnabled(java.lang.Boolean enabled)
Enable or disable logging.
|
void |
setLogLevel(java.util.logging.Level logLevel)
Set a current logging level.
|
void |
setLogLevelStr(java.lang.String logLevel) |
void |
setMetricUpdateInterval(java.lang.Integer interval)
Sets the metric update interval value.
|
void |
setTraceEnabled(java.lang.Boolean enabled)
Enable or disable tracing.
|
void |
startConnectionPool(java.lang.String poolName)
Starts the connection pool.
|
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.
|
void |
unregisterUniversalConnectionPoolMBean(java.lang.String poolName)
Unregisters the Universal Connection Pool MBean from the MBean server.
|
void startConnectionPool(java.lang.String poolName)
throws UniversalConnectionPoolException
poolname as a key. Pool operation is
called to start the connection pool.
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.
poolName - Connection pool name to find the connection pool object from the
pool manager.UniversalConnectionPoolException - If an error occurs while starting the connection pool.void stopConnectionPool(java.lang.String poolName)
throws UniversalConnectionPoolException
poolname as a key. Pool operation is called to stop the
connection pool. Stops the metric collection if it is already started.poolName - 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(java.lang.String poolName)
throws UniversalConnectionPoolException
poolname as a key. Pool operation is called
to refresh the connection pool.poolName - Connection pool name to find the connection pool object from the
pool manager.UniversalConnectionPoolException - If an error occurs while refreshing the connection pool.void recycleConnectionPool(java.lang.String poolName)
throws UniversalConnectionPoolException
poolname as a 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.poolName - Connection pool name to find the connection pool object from the
pool manager.UniversalConnectionPoolException - If an error occurs while recycling the connection pool.void purgeConnectionPool(java.lang.String poolName)
throws UniversalConnectionPoolException
poolname as a 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.
poolName - Connection pool name to find the connection pool object from the
pool manager.UniversalConnectionPoolException - If an error occurs while purging the connection pool.UniversalConnectionPoolMBean createConnectionPool(UniversalConnectionPoolAdapter ucpAdapter) throws UniversalConnectionPoolException
ucpAdapter - The UCP Adapter for pool creation.UniversalConnectionPoolException - If an error occurs while creating the connection pool.void destroyConnectionPool(java.lang.String poolName)
throws UniversalConnectionPoolException
poolname as a key. Pool operation is
called to stop the connection pool. The pool is stopped and removed from
the manager.poolName - 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(java.lang.String poolName,
java.util.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,
connectionCreationConsumer,
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.java.lang.String[] getConnectionPoolNames()
throws UniversalConnectionPoolException
UniversalConnectionPoolException - If an error occurs while getting the pool names.void startMetricsCollection(java.lang.String poolName)
throws UniversalConnectionPoolException
poolName - Connection pool name to find the connection pool object from the
pool manager.UniversalConnectionPoolException - If an error occurs while starting metrics collection.void stopMetricsCollection(java.lang.String poolName)
throws UniversalConnectionPoolException
poolName - Connection pool name to find the connection pool object from the
pool manager.UniversalConnectionPoolException - If an error occurs while stopping metrics collection.void setMetricUpdateInterval(java.lang.Integer interval)
throws UniversalConnectionPoolException
interval - Value for metric update interval in seconds.UniversalConnectionPoolException - If an error occurs while updating metric interval.java.lang.Integer getMetricUpdateInterval()
void registerUniversalConnectionPoolMBean(UniversalConnectionPoolMBean poolMBean) throws UniversalConnectionPoolException
RequiredModelMBean class during the registration of the
Model MBean.poolMBean - the MBean to register in the MBeanServer.UniversalConnectionPoolException - If an error occurs while registering the MBean.void unregisterUniversalConnectionPoolMBean(java.lang.String poolName)
throws UniversalConnectionPoolException
RequiredModelMBean
class during the registration of the Model MBean.poolName - Pool name to identify the MBean and to
unregister it from the MBeanServer.UniversalConnectionPoolException - If an error occurs while unregistering the MBean.UniversalConnectionPoolLifeCycleState getConnectionPoolLifeCycleState(java.lang.String poolName) throws UniversalConnectionPoolException
poolName - Connection pool name to find the connection pool object from
Universal Connection Pool Manager.UniversalConnectionPoolException - If an error occurs while getting the life cycle state.java.lang.String getMBeanNameForConnectionPool(java.lang.String connectionPoolName)
throws UniversalConnectionPoolException
connectionPoolName - Connection Pool Name for which MBean Name is queriedUniversalConnectionPoolException - in case of inability to get a pool.java.lang.String diagnosticsSummaryPrintout()
java.lang.Boolean getTraceEnabled()
Tracing is the message logging into an in-memory ring buffer.
This predicate returns a setting that applies to future pools only. This setting does not affect existing pools.
void setTraceEnabled(java.lang.Boolean enabled)
Tracing is the message logging into an in-memory ring buffer.
This setter only applies to future pools and won't affect existing ones. If you need to configure an existing pool you can use its dedicated MBean
enabled - - true, if enabled, false otherwise.java.lang.Boolean getLoggingEnabled()
This is the traditional detailed logging for debugging purposes.
This predicate returns a setting that applies to future pools only. This setting does not affect existing pools.
void setLoggingEnabled(java.lang.Boolean enabled)
This is the traditional detailed logging for debugging purposes.
This setter only applies to future pools and won't affect existing ones. If you need to configure an existing pool you can use its dedicated MBean
enabled - - true, if enabled, false otherwise.java.util.logging.Level getLogLevel()
This getter returns a setting that applies to future pools only. This setting does not affect existing pools.
java.lang.String getLogLevelStr()
void setLogLevel(java.util.logging.Level logLevel)
This setter only applies to future pools and won't affect existing ones. If you need to configure an existing pool you can use its dedicated MBean.
logLevel - current logging level to set.void setLogLevelStr(java.lang.String logLevel)
java.lang.Integer getBufferSize()
Tracing is the message logging into an in-memory ring buffer. This setting defines this buffer's size.
This getter returns a setting that applies to future pools only. This setting does not affect existing pools.
void setBufferSize(java.lang.Integer bufferSize)
Tracing is the message logging into an in-memory ring buffer. This setting defines this buffer's size.
This setter only applies to future pools and won't affect existing ones. If you need to configure an existing pool you can use its dedicated MBean
bufferSize - current in-memory trace buffer size to setjava.lang.String getErrorCodesToWatchList()
This getter returns a property that applies to future pools only. This setting does not affect existing pools.
void setErrorCodesToWatchList(java.lang.String errorCodesToWatchList)
This setter only applies to future pools and won't affect existing ones. If you need to configure an existing pool you can use its dedicated MBean
errorCodesToWatchList - list of error codes.java.lang.String getLoggingConfigFile()
This getter returns a property that applies to future pools only. This setting does not affect existing pools.
void setLoggingConfigFile(java.lang.String loggingConfigFile)
This setter only applies to future pools and won't affect existing ones. If you need to configure an existing pool you can use its dedicated MBean
loggingConfigFile - void dumpTraceBuffer()
Call this method to dump trace buffers of all existing pools.