Interface ConnectionPoolMBean
- All Superinterfaces:
PoolConfiguration
- All Known Implementing Classes:
ConnectionPool, DataSource, XADataSource
JMX MBean interface for monitoring and managing a JDBC connection pool.
-
Field Summary
Fields inherited from interface PoolConfiguration
PKG_PREFIX -
Method Summary
Modifier and TypeMethodDescriptionvoidChecks for and removes abandoned connections from the pool.voidChecks and cleans up idle connections in the pool.intReturns the number of active (in-use) connections.longReturns the total number of connections borrowed since pool creation.longReturns the total number of connections created since pool creation.intgetIdle()Returns the number of idle connections in the pool.intReturns the number of active (in-use) connections.intReturns the number of idle connections in the pool.longReturns the total number of reconnections since pool creation.longReturns the total number of connections released since pool creation.longReturns the total number of idle connections released by the pool cleaner.longReturns the total number of connections removed due to abandonment.longReturns the total number of connections returned since pool creation.intgetSize()Returns the total number of connections in the pool.intReturns the number of threads waiting for a connection.voidpurge()Purges all connections in the pool.voidPurges connections when they are returned from the pool.voidreset the statistics of this pool.voidtestIdle()Validates all idle connections in the pool.Methods inherited from interface PoolConfiguration
getAbandonWhenPercentageFull, getCommitOnReturn, getConnectionProperties, getDataSource, getDataSourceJNDI, getDbProperties, getDefaultAutoCommit, getDefaultCatalog, getDefaultReadOnly, getDefaultTransactionIsolation, getDriverClassName, getInitialSize, getInitSQL, getJdbcInterceptors, getJdbcInterceptorsAsArray, getLogValidationErrors, getMaxActive, getMaxAge, getMaxIdle, getMaxWait, getMinEvictableIdleTimeMillis, getMinIdle, getName, getNumTestsPerEvictionRun, getPassword, getPoolName, getPropagateInterruptState, getRemoveAbandonedTimeout, getRollbackOnReturn, getSuspectTimeout, getTimeBetweenEvictionRunsMillis, getUrl, getUseDisposableConnectionFacade, getUseLock, getUsername, getUseStatementFacade, getValidationInterval, getValidationQuery, getValidationQueryTimeout, getValidator, getValidatorClassName, isAccessToUnderlyingConnectionAllowed, isAlternateUsernameAllowed, isDefaultAutoCommit, isDefaultReadOnly, isFairQueue, isIgnoreExceptionOnPreLoad, isJmxEnabled, isLogAbandoned, isPoolSweeperEnabled, isRemoveAbandoned, isTestOnBorrow, isTestOnConnect, isTestOnReturn, isTestWhileIdle, isUseEquals, setAbandonWhenPercentageFull, setAccessToUnderlyingConnectionAllowed, setAlternateUsernameAllowed, setCommitOnReturn, setConnectionProperties, setDataSource, setDataSourceJNDI, setDbProperties, setDefaultAutoCommit, setDefaultCatalog, setDefaultReadOnly, setDefaultTransactionIsolation, setDriverClassName, setFairQueue, setIgnoreExceptionOnPreLoad, setInitialSize, setInitSQL, setJdbcInterceptors, setJmxEnabled, setLogAbandoned, setLogValidationErrors, setMaxActive, setMaxAge, setMaxIdle, setMaxWait, setMinEvictableIdleTimeMillis, setMinIdle, setName, setNumTestsPerEvictionRun, setPassword, setPropagateInterruptState, setRemoveAbandoned, setRemoveAbandonedTimeout, setRollbackOnReturn, setSuspectTimeout, setTestOnBorrow, setTestOnConnect, setTestOnReturn, setTestWhileIdle, setTimeBetweenEvictionRunsMillis, setUrl, setUseDisposableConnectionFacade, setUseEquals, setUseLock, setUsername, setUseStatementFacade, setValidationInterval, setValidationQuery, setValidationQueryTimeout, setValidator, setValidatorClassName
-
Method Details
-
getSize
int getSize()Returns the total number of connections in the pool.- Returns:
- total connection count
-
getIdle
int getIdle()Returns the number of idle connections in the pool.- Returns:
- idle connection count
-
getActive
int getActive()Returns the number of active (in-use) connections.- Returns:
- active connection count
-
getNumIdle
int getNumIdle()Returns the number of idle connections in the pool.- Returns:
- idle connection count
-
getNumActive
int getNumActive()Returns the number of active (in-use) connections.- Returns:
- active connection count
-
getWaitCount
int getWaitCount()Returns the number of threads waiting for a connection.- Returns:
- wait count
-
getBorrowedCount
long getBorrowedCount()Returns the total number of connections borrowed since pool creation.- Returns:
- borrowed count
-
getReturnedCount
long getReturnedCount()Returns the total number of connections returned since pool creation.- Returns:
- returned count
-
getCreatedCount
long getCreatedCount()Returns the total number of connections created since pool creation.- Returns:
- created count
-
getReleasedCount
long getReleasedCount()Returns the total number of connections released since pool creation.- Returns:
- released count
-
getReconnectedCount
long getReconnectedCount()Returns the total number of reconnections since pool creation.- Returns:
- reconnected count
-
getRemoveAbandonedCount
long getRemoveAbandonedCount()Returns the total number of connections removed due to abandonment.- Returns:
- abandoned count
-
getReleasedIdleCount
long getReleasedIdleCount()Returns the total number of idle connections released by the pool cleaner.- Returns:
- released idle count
-
checkIdle
void checkIdle()Checks and cleans up idle connections in the pool. -
checkAbandoned
void checkAbandoned()Checks for and removes abandoned connections from the pool. -
testIdle
void testIdle()Validates all idle connections in the pool. -
purge
void purge()Purges all connections in the pool. For connections currently in use, these connections will be purged when returned on the pool. This call also purges connections that are idle and in the pool To only purge used/active connections seepurgeOnReturn() -
purgeOnReturn
void purgeOnReturn()Purges connections when they are returned from the pool. This call does not purge idle connections until they are used. To purge idle connections seepurge() -
resetStats
void resetStats()reset the statistics of this pool.
-