Package org.glassfish.jdbc.pool.monitor
Class JdbcConnPoolStatsProvider
java.lang.Object
org.glassfish.jdbc.pool.monitor.JdbcConnPoolStatsProvider
@AMXMetadata(type="jdbc-connection-pool-mon",
group="monitoring")
@ManagedObject
@Description("JDBC Statistics")
public class JdbcConnPoolStatsProvider
extends Object
StatsProvider object for Jdbc pool monitoring.
Implements various events related to jdbc pool monitoring and provides
objects to the calling modules that retrieve monitoring information.
- Author:
- Shalini M
-
Constructor Summary
ConstructorsConstructorDescriptionJdbcConnPoolStatsProvider(org.glassfish.resourcebase.resources.api.PoolInfo poolInfo) -
Method Summary
Modifier and TypeMethodDescriptionvoidconnectionAcquiredEvent(String poolName, String appName, String moduleName) When a connection is acquired increment countervoidconnectionCreatedEvent(String poolName, String appName, String moduleName) When a connection is created increment countervoidconnectionDestroyedEvent(String poolName, String appName, String moduleName) When connection destroyed event is got increment numConnDestroyed.voidconnectionMatchedEvent(String poolName, String appName, String moduleName) When connection under test matches the current request , increment numConnSuccessfullyMatched.voidconnectionNotMatchedEvent(String poolName, String appName, String moduleName) When a connection under test does not match the current request, increment numConnNotSuccessfullyMatched.voidconnectionReleasedEvent(String poolName, String appName, String moduleName) When a connection is released increment countervoidconnectionRequestDequeuedEvent(String poolName, String appName, String moduleName) When an object is removed from the wait queue, decrement the waitQueueLength.voidconnectionRequestQueuedEvent(String poolName, String appName, String moduleName) When an object is added to wait queue, increment the waitQueueLength.voidconnectionRequestServedEvent(String poolName, String appName, String moduleName, long timeTakenInMillis) Event that a connection request is served in timeTakenInMillis.voidconnectionsFreedEvent(String poolName, String appName, String moduleName, int count) Connections freed eventvoidconnectionTimedOutEvent(String poolName, String appName, String moduleName) Whenever connection timed-out event occurs, increment numConnTimedOutvoidconnectionUsedEvent(String poolName, String appName, String moduleName) Connection used eventvoidconnectionValidationFailedEvent(String poolName, String appName, String moduleName, int increment) Whenever connection leak happens, increment numConnFailedValidationvoiddecrementConnectionUsedEvent(String poolName, String appName, String moduleName) Decrement numConnUsed eventvoiddecrementNumConnFreeEvent(String poolName, String appName, String moduleName) Decrement numconnfree eventorg.glassfish.external.statistics.CountStatisticorg.glassfish.external.statistics.RangeStatisticorg.glassfish.external.statistics.CountStatisticorg.glassfish.external.statistics.CountStatisticorg.glassfish.external.statistics.CountStatisticorg.glassfish.external.statistics.CountStatisticorg.glassfish.external.statistics.RangeStatisticorg.glassfish.external.statistics.CountStatisticorg.glassfish.external.statistics.CountStatisticorg.glassfish.external.statistics.CountStatisticorg.glassfish.external.statistics.CountStatisticorg.glassfish.external.statistics.RangeStatisticorg.glassfish.external.statistics.CountStatisticorg.glassfish.resourcebase.resources.api.PoolInfocom.sun.enterprise.resource.pool.PoolLifeCycleListenerRegistryorg.glassfish.external.statistics.CountStatisticvoidincrementNumConnFreeEvent(String poolName, String appName, String moduleName, boolean beingDestroyed, int steadyPoolSize) Increment numconnfree eventvoidpotentialConnLeakEvent(String poolName, String appName, String moduleName) Whenever connection leak happens, increment numPotentialConnLeakvoidreset()Reset pool statistics.voidsetPoolRegistry(com.sun.enterprise.resource.pool.PoolLifeCycleListenerRegistry poolRegistry) toString()
-
Constructor Details
-
JdbcConnPoolStatsProvider
public JdbcConnPoolStatsProvider(org.glassfish.resourcebase.resources.api.PoolInfo poolInfo)
-
-
Method Details
-
potentialConnLeakEvent
Whenever connection leak happens, increment numPotentialConnLeak -
connectionTimedOutEvent
Whenever connection timed-out event occurs, increment numConnTimedOut -
decrementNumConnFreeEvent
Decrement numconnfree event -
incrementNumConnFreeEvent
public void incrementNumConnFreeEvent(String poolName, String appName, String moduleName, boolean beingDestroyed, int steadyPoolSize) Increment numconnfree event -
decrementConnectionUsedEvent
Decrement numConnUsed event -
connectionsFreedEvent
Connections freed event- Parameters:
count- number of connections freed to the pool
-
connectionUsedEvent
Connection used event -
connectionValidationFailedEvent
public void connectionValidationFailedEvent(String poolName, String appName, String moduleName, int increment) Whenever connection leak happens, increment numConnFailedValidation -
connectionRequestServedEvent
public void connectionRequestServedEvent(String poolName, String appName, String moduleName, long timeTakenInMillis) Event that a connection request is served in timeTakenInMillis.- Parameters:
poolName-timeTakenInMillis-
-
connectionDestroyedEvent
When connection destroyed event is got increment numConnDestroyed. -
connectionAcquiredEvent
When a connection is acquired increment counter -
connectionReleasedEvent
When a connection is released increment counter -
connectionCreatedEvent
When a connection is created increment counter -
reset
public void reset()Reset pool statistics. When annotated with @Reset, this method is invoked whenever monitoring is turned to HIGH from OFF, thereby setting the statistics to appropriate values. -
connectionMatchedEvent
When connection under test matches the current request , increment numConnSuccessfullyMatched. -
connectionNotMatchedEvent
When a connection under test does not match the current request, increment numConnNotSuccessfullyMatched. -
connectionRequestQueuedEvent
When an object is added to wait queue, increment the waitQueueLength. -
connectionRequestDequeuedEvent
When an object is removed from the wait queue, decrement the waitQueueLength. -
getPoolInfo
public org.glassfish.resourcebase.resources.api.PoolInfo getPoolInfo() -
setPoolRegistry
public void setPoolRegistry(com.sun.enterprise.resource.pool.PoolLifeCycleListenerRegistry poolRegistry) -
getPoolRegistry
public com.sun.enterprise.resource.pool.PoolLifeCycleListenerRegistry getPoolRegistry() -
getNumPotentialConnLeakCount
@ManagedAttribute(id="numpotentialconnleak") public org.glassfish.external.statistics.CountStatistic getNumPotentialConnLeakCount() -
getNumConnFailedValidation
@ManagedAttribute(id="numconnfailedvalidation") public org.glassfish.external.statistics.CountStatistic getNumConnFailedValidation() -
getNumConnTimedOut
@ManagedAttribute(id="numconntimedout") public org.glassfish.external.statistics.CountStatistic getNumConnTimedOut() -
getNumConnUsed
@ManagedAttribute(id="numconnused") public org.glassfish.external.statistics.RangeStatistic getNumConnUsed() -
getNumConnFree
@ManagedAttribute(id="numconnfree") public org.glassfish.external.statistics.RangeStatistic getNumConnFree() -
getConnRequestWaitTime
@ManagedAttribute(id="connrequestwaittime") public org.glassfish.external.statistics.RangeStatistic getConnRequestWaitTime() -
getNumConnDestroyed
@ManagedAttribute(id="numconndestroyed") public org.glassfish.external.statistics.CountStatistic getNumConnDestroyed() -
getNumConnAcquired
@ManagedAttribute(id="numconnacquired") public org.glassfish.external.statistics.CountStatistic getNumConnAcquired() -
getNumConnCreated
@ManagedAttribute(id="numconncreated") public org.glassfish.external.statistics.CountStatistic getNumConnCreated() -
getNumConnReleased
@ManagedAttribute(id="numconnreleased") public org.glassfish.external.statistics.CountStatistic getNumConnReleased() -
getNumConnSuccessfullyMatched
@ManagedAttribute(id="numconnsuccessfullymatched") public org.glassfish.external.statistics.CountStatistic getNumConnSuccessfullyMatched() -
getNumConnNotSuccessfullyMatched
@ManagedAttribute(id="numconnnotsuccessfullymatched") public org.glassfish.external.statistics.CountStatistic getNumConnNotSuccessfullyMatched() -
getAverageConnWaitTime
@ManagedAttribute(id="averageconnwaittime") public org.glassfish.external.statistics.CountStatistic getAverageConnWaitTime() -
getWaitQueueLength
@ManagedAttribute(id="waitqueuelength") public org.glassfish.external.statistics.CountStatistic getWaitQueueLength() -
toString
-