public interface UniversalConnectionPoolMBean
| Modifier and Type | Method and Description |
|---|---|
java.lang.Integer |
getAbandonedConnectionsCount()
Gets the number of abandoned connections that have been reclaimed.
|
java.lang.Integer |
getAbandonedConnectionTimeout()
Gets the abandoned connection timeout of the Universal Connection Pool
instance.
|
java.lang.Integer |
getAvailableConnectionsCount()
Gets the available connections count of the Universal Connection Pool
instance.
|
java.lang.Integer |
getAverageBorrowedConnectionsCount()
Gets the average number of connections that are borrowed and
actively in use by clients.
|
java.lang.Long |
getAverageConnectionWaitTime()
Gets the average time (in milliseconds) a user thread has to wait before it could obtain
a connection from the connection pool.
|
java.lang.Integer |
getBorrowedConnectionsCount()
Gets the borrowed connections count of the Universal Connection Pool
instance.
|
java.lang.Integer |
getBufferSize()
Get in-memory trace buffer size.
|
java.lang.String |
getColocationStats()
Get processing info for COLOCATION_TAG support.
|
java.lang.Integer |
getConnectionHarvestMaxCount()
Gets the connection harvest maximum count of the Universal Connection
Pool instance.
|
java.lang.Integer |
getConnectionHarvestTriggerCount()
Gets the connection harvest trigger count of the Universal Connection
Pool instance.
|
java.lang.Long |
getConnectionRepurposeCount()
Returns the number of connection repurposed in a shared pool
for a mutitenant database, where connections can be reused
across PDB's by switching their container and PDB service.
|
java.lang.Integer |
getConnectionsClosedCount()
Gets the number of connections closed by this connection pool.
|
java.lang.Integer |
getConnectionsCreatedCount()
Gets the number of connections created for this connection pool.
|
java.lang.Integer |
getConnectionValidationTimeout()
Connection validation timeout getter
|
java.time.Duration |
getConnectionWaitDuration()
Returns how much time a connection request call may wait before it either
successfully returns a connection or throws an exception.
|
java.lang.Integer |
getConnectionWaitTimeout()
Deprecated.
|
java.lang.Long |
getCumulativeConnectionBorrowedCount()
Gets the number of connections borrowed from the connection pool over the
life of the pool.
|
java.lang.Long |
getCumulativeConnectionReturnedCount()
Gets the number of connections returned to the connection pool
over the life of the pool.
|
java.lang.Long |
getCumulativeConnectionUseTime()
Gets the cumulative time (in milliseconds) of connections that were
borrowed from the pool and remained in use.
|
java.lang.Long |
getCumulativeConnectionWaitTime()
Gets the cumulative time (in milliseconds) that connection requests
have waited for connections over the life of the connection pool.
|
java.lang.Long |
getCumulativeFailedConnectionWaitCount()
Gets the number of connection requests that waited unsuccessfully
to borrow a connection from the pool.
|
java.lang.Long |
getCumulativeFailedConnectionWaitTime()
Gets the cumulative time (in milliseconds) that connection requests
waited but failed to borrow a connection from the pool.
|
java.lang.Long |
getCumulativeSuccessfulConnectionWaitCount()
Gets the number of connection requests that waited successfully
and borrowed a connection from the pool.
|
java.lang.Long |
getCumulativeSuccessfulConnectionWaitTime()
Gets the cumulative time (in milliseconds) that connection requests
waited successfully and borrowed a connection from the pool.
|
java.lang.Long |
getFailedAffinityBasedBorrowCount()
Gets the number of borrow requests that returned connections not
matching the affinity contexts.
|
java.lang.Long |
getFailedRCLBBasedBorrowCount()
Gets the number of borrow requests failed using Runtime Connection
Load-Balancing (RCLB) algorithms.
|
java.lang.String |
getFcfProcessingInfo()
Gets the information of recent Fast Connection Failover (FCF)
attempts, in the form of a String.
|
java.lang.String |
getFcfProcessingInfoProcessedOnly() |
java.lang.Integer |
getInactiveConnectionTimeout()
Gets the inactive connection timeout of the Universal Connection Pool
instance.
|
java.lang.Integer |
getInitialPoolSize()
Gets the initial pool size of the Universal Connection Pool instance.
|
java.lang.Integer |
getLabeledConnectionsCount()
Gets the number of labeled connections in the connection pool.
|
java.lang.String |
getLifeCycleState()
Gets the lifecycle state of Universal Connection Pool instance.
|
java.lang.Boolean |
getLoggingEnabled() |
java.util.logging.Level |
getLogLevel()
Get a current logging level.
|
java.lang.String |
getLogLevelStr() |
java.lang.Integer |
getMaxConnectionReuseCount()
Gets the maximum connection reuse count of the Universal Connection Pool
instance.
|
java.lang.Long |
getMaxConnectionReuseTime()
Gets the maximum connection reuse time of the Universal Connection Pool
instance.
|
java.lang.Integer |
getMaxPoolSize()
Gets the maximum pool size of the Universal Connection Pool instance.
|
javax.management.modelmbean.ModelMBeanInfo |
getMBeanInfo(javax.management.ObjectName mbeanObjName,
java.lang.String mbeanDisplayName)
Builds
MBeanInfo to define attributes, constructors,
operations and notifications to expose to the remote users. |
java.lang.Integer |
getMinPoolSize()
Gets the minimum pool size of the Universal Connection Pool instance.
|
java.lang.String |
getName()
Gets the name of the Universal Connection Pool instance.
|
default java.lang.Integer |
getPeakBorrowedConnectionsCount()
Gets the maximum number of borrowed connections that the connection pool has
reached during the life of the pool.
|
java.lang.Integer |
getPeakConnectionsCount()
Gets the maximum number of connections that the connection pool has
reached during the life of the pool.
|
java.lang.Long |
getPeakConnectionWaitTime()
Gets the longest wait (in milliseconds) a user request has to incur
before obtaining a connection from the connection pool.
|
java.lang.Integer |
getPendingRequestsCount()
Gets the number of clients that are currently waiting to obtain a
connection from the pool.
|
java.lang.Integer |
getRemainingPoolCapacityCount()
Gets the number of connections that may be added to the pool before
it reaches
maxPoolSize. |
java.lang.Integer |
getSecondsToTrustIdleConnection()
Gets the seconds To Trust Idle Connection value.
|
java.lang.String |
getShardConnectionStats()
Returns total, borrowed and available connection counts to various
shards discovered by the pool so far.
|
java.lang.Boolean |
getShardingMode()
Returns the mode of UCP when UCP is using a Sharded Database.
|
java.lang.String |
getStatistics()
Gets statistics for the Universal Connection Pool instance.
|
java.lang.Long |
getSuccessfulAffinityBasedBorrowCount()
Gets the number of borrow requests succeeded with matching affinity
contexts.
|
java.lang.Long |
getSuccessfulRCLBBasedBorrowCount()
Gets the number of borrow requests succeeded using Runtime
Connection Load-Balancing (RCLB) algorithms.
|
java.lang.Integer |
getTimeoutCheckInterval()
Gets the timeout check interval of the Universal Connection Pool instance.
|
java.lang.Integer |
getTimeToLiveConnectionTimeout()
Gets the time to live connection timeout of the Universal Connection
Pool instance.
|
java.lang.Integer |
getTotalConnectionsCount()
Gets the total number of connections (both available and borrowed)
in the connection pool.
|
java.lang.Boolean |
getTraceEnabled() |
javax.management.modelmbean.ModelMBeanAttributeInfo[] |
getUCPMBeanAttributes()
Builds the attribute information for the Universal Connection Pool MBean.
|
javax.management.modelmbean.ModelMBeanOperationInfo[] |
getUCPMBeanOperations()
Builds the operation information for the Universal Connection Pool MBean.
|
java.lang.Boolean |
getValidateConnectionOnBorrow()
Gets the validate connection on borrow value of the Universal Connection
Pool instance.
|
java.lang.Boolean |
isReadOnlyInstanceAllowed()
Returns true if the connection borrow is allowed to a read-only instance,
false otherwise.
|
void |
purge()
Purges the Universal Connection Pool instance.
|
void |
recycle()
Recycles the Universal Connection Pool instance.
|
void |
refresh()
Refreshes the Universal Connection Pool instance.
|
void |
setAbandonedConnectionTimeout(java.lang.Integer abandonedConnectionTimeout)
Sets the abandoned connection timeout of the Universal Connection Pool
instance.
|
void |
setBufferSize(java.lang.Integer bufferSize)
Set in-memory trace buffer size.
|
void |
setConnectionHarvestMaxCount(java.lang.Integer connectionHarvestMaxCount)
Sets the connection harvest maximum count for the Universal Connection
Pool instance.
|
void |
setConnectionHarvestTriggerCount(java.lang.Integer connectionHarvestTriggerCount)
Sets the connection harvest trigger count for the Universal Connection
Pool instance.
|
void |
setConnectionValidationTimeout(java.lang.Integer connectionValidationTimeout)
Connection validation timeout setter
|
void |
setConnectionWaitDuration(java.time.Duration connectionWaitDuration)
Configures how much time a connection request call may wait before it either
successfully returns a connection or throws an exception.
|
void |
setConnectionWaitTimeout(java.lang.Integer connectionWaitTimeout)
Deprecated.
|
void |
setInactiveConnectionTimeout(java.lang.Integer inactiveConnectionTimeout)
Sets the inactive connection timeout.
|
void |
setInitialPoolSize(java.lang.Integer initialPoolSize)
Sets the initial pool size of the Universal Connection Pool instance.
|
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 |
setMaxConnectionReuseCount(java.lang.Integer maxConnectionReuseCount)
Sets the maximum connection reuse count for the Universal Connection Pool
instance.
|
void |
setMaxConnectionReuseTime(java.lang.Long maxConnectionReuseTime)
Sets the maximum connection reuse time for the Universal Connection Pool
instance.
|
void |
setMaxPoolSize(java.lang.Integer maxPoolSize)
Sets the maximum pool size of the Universal Connection Pool instance.
|
void |
setMinPoolSize(java.lang.Integer minPoolSize)
Sets the minimum pool size of the Universal Connection Pool instance.
|
void |
setName(java.lang.String name)
Sets the name of the Universal Connection Pool instance.
|
void |
setReadOnlyInstanceAllowed(java.lang.Boolean readOnlyInstanceAllowed)
Sets the read-only instance allowed value on the datasource.
|
void |
setSecondsToTrustIdleConnection(java.lang.Integer secondsToTrustIdleConnection)
Sets the time in seconds to trust an idle connection to skip a validation
test.
|
void |
setShardingMode(java.lang.Boolean shardingMode)
This API changes the mode of UCP when UCP is using a Sharded Database.
|
void |
setTimeoutCheckInterval(java.lang.Integer timeoutCheckInterval)
Sets the timeout check interval of the Universal Connection Pool instance.
|
void |
setTimeToLiveConnectionTimeout(java.lang.Integer timeToLiveConnectionTimeout)
Sets the time to live connection timeout of the Universal Connection Pool
instance.
|
void |
setTraceEnabled(java.lang.Boolean enabled)
Enable or disable tracing.
|
void |
setValidateConnectionOnBorrow(java.lang.Boolean validateConnectionOnBorrow)
Makes the pool validate the connection before returning it to the user by
calling the JDBC API "isValid".
|
void |
start()
Starts the Universal Connection Pool instance.
|
void |
stop()
Stops the Universal Connection Pool instance.
|
void |
useStrictWebSessionAffinity(java.lang.Boolean strict)
The knob for switching strict web session affinity
|
void |
useStrictXAAffinity(java.lang.Boolean strict)
The knob for switching strict XA affinity
|
void refresh()
throws UniversalConnectionPoolException
UniversalConnectionPoolException - If an error occurs while refreshing the Universal Connection
Pool instance.void recycle()
throws UniversalConnectionPoolException
UniversalConnectionPoolException - If an error occurs while recycling the Universal Connection
Pool instance.void purge()
throws UniversalConnectionPoolException
UniversalConnectionPoolException - If an error occurs while purging the Universal Connection Pool
instance.void start()
throws UniversalConnectionPoolException
UniversalConnectionPoolException - If an error occurs while starting the Universal Connection Pool
instance.void stop() throws UniversalConnectionPoolException
UniversalConnectionPoolException - If an error occurs while stopping the Universal Connection Pool
instance.java.lang.String getName()
void setName(java.lang.String name)
throws UniversalConnectionPoolException
name - A new name for the Universal Connection Pool instance.UniversalConnectionPoolException - If an error occurs while changing the name.java.lang.Integer getInitialPoolSize()
void setInitialPoolSize(java.lang.Integer initialPoolSize)
throws UniversalConnectionPoolException
initialPoolSize - New initial pool size.UniversalConnectionPoolException - If an error occurs while changing the initial pool size.java.lang.Integer getMinPoolSize()
void setMinPoolSize(java.lang.Integer minPoolSize)
throws UniversalConnectionPoolException
minPoolSize - New minimum pool size.UniversalConnectionPoolException - If an error occurs while changing the minimum pool.java.lang.Integer getMaxPoolSize()
void setMaxPoolSize(java.lang.Integer maxPoolSize)
throws UniversalConnectionPoolException
maxPoolSize - New maximum pool size.UniversalConnectionPoolException - If an error occurs while changing the maximum pool size.java.lang.Integer getInactiveConnectionTimeout()
void setInactiveConnectionTimeout(java.lang.Integer inactiveConnectionTimeout)
throws UniversalConnectionPoolException
inactiveConnectionTimeout - New inactive connection timeout.UniversalConnectionPoolException - If an error occurs while changing the inactive connection
timeout.java.lang.Integer getAbandonedConnectionTimeout()
void setAbandonedConnectionTimeout(java.lang.Integer abandonedConnectionTimeout)
throws UniversalConnectionPoolException
abandonedConnectionTimeout - New abandoned connection timeout.UniversalConnectionPoolException - If an error occurs while changing the abandoned connection
timeout.@Deprecated java.lang.Integer getConnectionWaitTimeout()
Returns how much time a connection request call may wait before it either successfully returns a connection or throws an exception.
A borrow request may end up creating a new JDBC connection. Therefore, starting in 23.1, the value returned by this method may be larger than the configured one because UCP adjusts it so that it's always equal or larger than the CONNECT_TIMEOUT of the JDBC driver.
This method is deprecated.
Use getConnectionWaitDuration() instead.
@Deprecated
void setConnectionWaitTimeout(java.lang.Integer connectionWaitTimeout)
throws UniversalConnectionPoolException
Configures how much time a connection request call may wait before it either successfully returns a connection or throws an exception.
The wait timeout starts from the point when a connection borrow request is submitted to the pool.
During this time, UCP may either return a connection that's currently available in the pool (ideal scenario) or create a new connection if the pool hasn't reached its maximum size. Otherwise, UCP waits for a connection to be returned to the pool.
By default, the connection wait timeout is set to 3 seconds.
Setting the connection wait timeout to 0 makes UCP throw an exception immediately if there is no connection available and no room to grow the pool. Note that it still allows UCP to create a new connection if the maximum size hasn't been reached, and that may take some time.
UniversalConnectionPoolExceptionjava.time.Duration getConnectionWaitDuration()
Returns how much time a connection request call may wait before it either successfully returns a connection or throws an exception.
A borrow request may end up creating a new JDBC connection. Therefore, starting in 23.1, the value returned by this method may be larger than the configured one because UCP adjusts it so that it's always equal or larger than the CONNECT_TIMEOUT of the JDBC driver.
setConnectionWaitDurationvoid setConnectionWaitDuration(java.time.Duration connectionWaitDuration)
throws UniversalConnectionPoolException
Configures how much time a connection request call may wait before it either successfully returns a connection or throws an exception.
The wait duration starts from the point when a connection borrow request is submitted to the pool.
During this time, UCP may either return a connection that's currently available in the pool (ideal scenario) or create a new connection if the pool hasn't reached its maximum size. Otherwise, UCP waits for a connection to be returned to the pool.
By default, the connection wait timeout is set to 3 seconds.
Setting the connection wait timeout to
Duration.ZERO makes UCP throw an exception immediately if there is no
connection available and no room to grow the pool. Note that it still allows UCP
to create a new connection if the maximum size hasn't been reached, and that may
take some time.
connectionWaitDuration - The duration for a connection request to wait.UniversalConnectionPoolException - in case it was not possible to set timeout.java.lang.Integer getTimeToLiveConnectionTimeout()
void setTimeToLiveConnectionTimeout(java.lang.Integer timeToLiveConnectionTimeout)
throws UniversalConnectionPoolException
timeToLiveConnectionTimeout - New time to live connection timeout.UniversalConnectionPoolException - If an error occurs while changing the time to live connection
timeout.java.lang.Integer getTimeoutCheckInterval()
void setTimeoutCheckInterval(java.lang.Integer timeoutCheckInterval)
throws UniversalConnectionPoolException
timeoutCheckInterval - New timeout check interval.UniversalConnectionPoolException - If an error occurs while changing the timeout check interval.java.lang.Boolean getValidateConnectionOnBorrow()
void setValidateConnectionOnBorrow(java.lang.Boolean validateConnectionOnBorrow)
Makes the pool validate the connection before returning it to the user by calling the JDBC API "isValid".
Validating the connection each time it's borrowed from the pool has a performance cost because it typically requires a full roundtrip to the database. You can tune how the Oracle JDBC thin driver validates connections using the "oracle.jdbc.defaultConnectionValidation" property (please refer to the JDBC driver javadoc). You may also configure "secondsToTrustIdleConnection" to avoid validating connections that are often active.
validateConnectionOnBorrow - New validate connection on borrow value.setSecondsToTrustIdleConnectionjava.lang.Integer getConnectionHarvestTriggerCount()
void setConnectionHarvestTriggerCount(java.lang.Integer connectionHarvestTriggerCount)
throws UniversalConnectionPoolException
connectionHarvestTriggerCount - New connection harvest trigger count.UniversalConnectionPoolException - If an error occurs while changing the connection harvest
trigger count.java.lang.Integer getConnectionHarvestMaxCount()
void setConnectionHarvestMaxCount(java.lang.Integer connectionHarvestMaxCount)
throws UniversalConnectionPoolException
connectionHarvestMaxCount - New connection harvest maximum count.UniversalConnectionPoolException - If an error occurs while changing the connection harvest
maximum count.java.lang.Long getMaxConnectionReuseTime()
void setMaxConnectionReuseTime(java.lang.Long maxConnectionReuseTime)
throws UniversalConnectionPoolException
maxConnectionReuseTime - New maximum connection reuse time (in seconds).UniversalConnectionPoolException - If an error occurs while changing the maximum connection reuse
time.java.lang.Integer getMaxConnectionReuseCount()
void setMaxConnectionReuseCount(java.lang.Integer maxConnectionReuseCount)
throws UniversalConnectionPoolException
maxConnectionReuseCount - New maximum connection reuse count.UniversalConnectionPoolException - If an error occurs while changing the maximum connection reuse
count.void setShardingMode(java.lang.Boolean shardingMode)
shardingMode - Mode of UCP when using a Sharded Database.java.lang.Boolean getShardingMode()
void setConnectionValidationTimeout(java.lang.Integer connectionValidationTimeout)
throws UniversalConnectionPoolException
connectionValidationTimeout - timeout to setUniversalConnectionPoolException - in case of inability to set timeout.java.lang.Integer getConnectionValidationTimeout()
java.lang.Boolean isReadOnlyInstanceAllowed()
void setReadOnlyInstanceAllowed(java.lang.Boolean readOnlyInstanceAllowed)
readOnlyInstanceAllowed - whether to allow connection borrow to a read-only instance or notjava.lang.Integer getAvailableConnectionsCount()
java.lang.Integer getBorrowedConnectionsCount()
java.lang.String getStatistics()
java.lang.String getLifeCycleState()
javax.management.modelmbean.ModelMBeanAttributeInfo[] getUCPMBeanAttributes()
throws UniversalConnectionPoolException
ModelMBeanAttributeInfo[].UniversalConnectionPoolException - If an error occurs while getting
ModelMBeanAttributeInfo[].javax.management.modelmbean.ModelMBeanOperationInfo[] getUCPMBeanOperations()
throws UniversalConnectionPoolException
ModelMBeanOperationInfo[].UniversalConnectionPoolException - If an error occurs while getting
ModelMBeanOperationInfo[].javax.management.modelmbean.ModelMBeanInfo getMBeanInfo(javax.management.ObjectName mbeanObjName,
java.lang.String mbeanDisplayName)
throws UniversalConnectionPoolException
MBeanInfo to define attributes, constructors,
operations and notifications to expose to the remote users.mbeanObjName - Unique name for the Universal Connection Pool MBean.mbeanDisplayName - Display name for the Universal Connection Pool MBean.ModelMBeanInfo for Universal Connection Pool MBean.UniversalConnectionPoolException - If an error occurs while getting
ModelMBeanInfo for the Universal Connection Pool
MBean.void useStrictWebSessionAffinity(java.lang.Boolean strict)
strict - if strict, otherwise nonstrictvoid useStrictXAAffinity(java.lang.Boolean strict)
strict - true if strict, otherwise non-strictjava.lang.Integer getSecondsToTrustIdleConnection()
setSecondsToTrustIdleConnection().void setSecondsToTrustIdleConnection(java.lang.Integer secondsToTrustIdleConnection)
throws UniversalConnectionPoolException
setValidateConnectionOnBorrow(boolean). When set to any
positive value, a connection validation during the checkout is skipped if
the connection was successfully used and returned to the pool within the
time specified for secondsToTrustIdleConnection.
Default value is set to 0 seconds which means that the feature is disabled.
With this mode enabled, UCP will do a SOCKET validation on every connection borrow and default driver validation type (can be changed with the "oracle.jdbc.defaultConnectionValidation" system property) after designated seconds to trust idle connection has passed
secondsToTrustIdleConnection - The value of how long a connection can be trusted to skip
connectionValidationOnBorrowUniversalConnectionPoolException - in case of inability to set timeoutjava.lang.Integer getTotalConnectionsCount()
java.lang.Integer getAverageBorrowedConnectionsCount()
java.lang.Integer getPeakConnectionsCount()
default java.lang.Integer getPeakBorrowedConnectionsCount()
java.lang.Integer getRemainingPoolCapacityCount()
maxPoolSize.maxPoolSize.java.lang.Integer getLabeledConnectionsCount()
java.lang.Integer getConnectionsCreatedCount()
java.lang.Integer getConnectionsClosedCount()
java.lang.Long getAverageConnectionWaitTime()
java.lang.Long getPeakConnectionWaitTime()
java.lang.Integer getAbandonedConnectionsCount()
java.lang.Integer getPendingRequestsCount()
java.lang.Long getCumulativeConnectionWaitTime()
java.lang.Long getCumulativeConnectionBorrowedCount()
java.lang.Long getCumulativeConnectionUseTime()
java.lang.Long getCumulativeConnectionReturnedCount()
java.lang.Long getCumulativeSuccessfulConnectionWaitTime()
java.lang.Long getCumulativeSuccessfulConnectionWaitCount()
java.lang.Long getCumulativeFailedConnectionWaitTime()
java.lang.Long getCumulativeFailedConnectionWaitCount()
java.lang.Long getSuccessfulAffinityBasedBorrowCount()
java.lang.Long getFailedAffinityBasedBorrowCount()
java.lang.Long getSuccessfulRCLBBasedBorrowCount()
java.lang.Long getFailedRCLBBasedBorrowCount()
java.lang.String getFcfProcessingInfo()
java.lang.String getFcfProcessingInfoProcessedOnly()
java.lang.Long getConnectionRepurposeCount()
java.lang.String getShardConnectionStats()
java.lang.String getColocationStats()
java.lang.Boolean getTraceEnabled()
void setTraceEnabled(java.lang.Boolean enabled)
enabled - true to enable tracing, false otherwise.java.lang.Boolean getLoggingEnabled()
void setLoggingEnabled(java.lang.Boolean enabled)
enabled - true to enable logging, false otherwise.java.util.logging.Level getLogLevel()
java.lang.String getLogLevelStr()
void setLogLevel(java.util.logging.Level logLevel)
logLevel - current logging level to set.void setLogLevelStr(java.lang.String logLevel)
java.lang.Integer getBufferSize()
void setBufferSize(java.lang.Integer bufferSize)
bufferSize - current in-memory trace buffer size to set.