Package org.apache.tomcat.jdbc.pool.jmx
Interface ConnectionPoolMBean
-
- All Superinterfaces:
PoolConfiguration
- All Known Implementing Classes:
ConnectionPool,DataSource,XADataSource
public interface ConnectionPoolMBean extends PoolConfiguration
JMX MBean interface for monitoring and managing a JDBC connection pool.
-
-
Field Summary
-
Fields inherited from interface org.apache.tomcat.jdbc.pool.PoolConfiguration
PKG_PREFIX
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidcheckAbandoned()Checks for and removes abandoned connections from the pool.voidcheckIdle()Checks and cleans up idle connections in the pool.intgetActive()Returns the number of active (in-use) connections.longgetBorrowedCount()Returns the total number of connections borrowed since pool creation.longgetCreatedCount()Returns the total number of connections created since pool creation.intgetIdle()Returns the number of idle connections in the pool.intgetNumActive()Returns the number of active (in-use) connections.intgetNumIdle()Returns the number of idle connections in the pool.longgetReconnectedCount()Returns the total number of reconnections since pool creation.longgetReleasedCount()Returns the total number of connections released since pool creation.longgetReleasedIdleCount()Returns the total number of idle connections released by the pool cleaner.longgetRemoveAbandonedCount()Returns the total number of connections removed due to abandonment.longgetReturnedCount()Returns the total number of connections returned since pool creation.intgetSize()Returns the total number of connections in the pool.intgetWaitCount()Returns the number of threads waiting for a connection.voidpurge()Purges all connections in the pool.voidpurgeOnReturn()Purges connections when they are returned from the pool.voidresetStats()reset the statistics of this pool.voidtestIdle()Validates all idle connections in the pool.-
Methods inherited from interface org.apache.tomcat.jdbc.pool.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 Detail
-
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.
-
-