Class ConnectorConnPoolStatsProvider
- java.lang.Object
-
- com.sun.enterprise.resource.pool.monitor.ConnectorConnPoolStatsProvider
-
@AMXMetadata(type="connector-connection-pool-mon", group="monitoring") @ManagedObject @Description("Connector Connection Pool Statistics") public class ConnectorConnPoolStatsProvider extends ObjectStatsProvider 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
Constructors Constructor Description ConnectorConnPoolStatsProvider(PoolInfo poolInfo, Logger logger)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidconnectionAcquiredEvent(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.CountStatisticgetAverageConnWaitTime()org.glassfish.external.statistics.RangeStatisticgetConnRequestWaitTime()org.glassfish.external.statistics.CountStatisticgetNumConnAcquired()org.glassfish.external.statistics.CountStatisticgetNumConnCreated()org.glassfish.external.statistics.CountStatisticgetNumConnDestroyed()org.glassfish.external.statistics.CountStatisticgetNumConnFailedValidation()org.glassfish.external.statistics.RangeStatisticgetNumConnFree()org.glassfish.external.statistics.CountStatisticgetNumConnNotSuccessfullyMatched()org.glassfish.external.statistics.CountStatisticgetNumConnReleased()org.glassfish.external.statistics.CountStatisticgetNumConnSuccessfullyMatched()org.glassfish.external.statistics.CountStatisticgetNumConnTimedOut()org.glassfish.external.statistics.RangeStatisticgetNumConnUsed()org.glassfish.external.statistics.CountStatisticgetNumPotentialConnLeakCount()When a connection leak is observed, the monitoring statistics are displayed to the server.log.protected PoolInfogetPoolInfo()protected PoolLifeCycleListenerRegistrygetPoolRegistry()org.glassfish.external.statistics.CountStatisticgetWaitQueueLength()voidincrementNumConnFreeEvent(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 When annotated with @Reset, this method is invoked whenever monitoring is turned to HIGH from OFF, thereby setting the statistics to appropriate values.protected voidsetPoolRegistry(PoolLifeCycleListenerRegistry registry)
-
-
-
Method Detail
-
potentialConnLeakEvent
public void potentialConnLeakEvent(String poolName, String appName, String moduleName)
Whenever connection leak happens, increment numPotentialConnLeak- Parameters:
pool- JdbcConnectionPool that got a connLeakEvent
-
connectionTimedOutEvent
public void connectionTimedOutEvent(String poolName, String appName, String moduleName)
Whenever connection timed-out event occurs, increment numConnTimedOut- Parameters:
pool- JdbcConnectionPool that got a connTimedOutEvent
-
decrementNumConnFreeEvent
public void decrementNumConnFreeEvent(String poolName, String appName, String moduleName)
Decrement numconnfree event- Parameters:
poolName-
-
incrementNumConnFreeEvent
public void incrementNumConnFreeEvent(String poolName, String appName, String moduleName, boolean beingDestroyed, int steadyPoolSize)
Increment numconnfree event- Parameters:
poolName-beingDestroyed- if the connection is destroyed due to errorsteadyPoolSize-
-
decrementConnectionUsedEvent
public void decrementConnectionUsedEvent(String poolName, String appName, String moduleName)
Decrement numConnUsed event- Parameters:
poolName-
-
connectionsFreedEvent
public void connectionsFreedEvent(String poolName, String appName, String moduleName, int count)
Connections freed event- Parameters:
poolName-count- number of connections freed to the pool
-
connectionUsedEvent
public void connectionUsedEvent(String poolName, String appName, String moduleName)
Connection used event- Parameters:
poolName-
-
connectionValidationFailedEvent
public void connectionValidationFailedEvent(String poolName, String appName, String moduleName, int increment)
Whenever connection leak happens, increment numConnFailedValidation- Parameters:
pool- JdbcConnectionPool that got a failed validation event
-
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
public void connectionDestroyedEvent(String poolName, String appName, String moduleName)
When connection destroyed event is got increment numConnDestroyed.
-
connectionAcquiredEvent
public void connectionAcquiredEvent(String poolName, String appName, String moduleName)
When a connection is acquired increment counter
-
connectionReleasedEvent
public void connectionReleasedEvent(String poolName, String appName, String moduleName)
When a connection is released increment counter
-
connectionCreatedEvent
public void connectionCreatedEvent(String poolName, String appName, String moduleName)
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
public void connectionMatchedEvent(String poolName, String appName, String moduleName)
When connection under test matches the current request , increment numConnSuccessfullyMatched.
-
connectionNotMatchedEvent
public void connectionNotMatchedEvent(String poolName, String appName, String moduleName)
When a connection under test does not match the current request, increment numConnNotSuccessfullyMatched.
-
connectionRequestQueuedEvent
public void connectionRequestQueuedEvent(String poolName, String appName, String moduleName)
When an object is added to wait queue, increment the waitQueueLength.
-
connectionRequestDequeuedEvent
public void connectionRequestDequeuedEvent(String poolName, String appName, String moduleName)
When an object is removed from the wait queue, decrement the waitQueueLength.
-
getPoolInfo
protected PoolInfo getPoolInfo()
-
setPoolRegistry
protected void setPoolRegistry(PoolLifeCycleListenerRegistry registry)
-
getPoolRegistry
protected PoolLifeCycleListenerRegistry getPoolRegistry()
-
getNumPotentialConnLeakCount
@ManagedAttribute(id="numpotentialconnleak") public org.glassfish.external.statistics.CountStatistic getNumPotentialConnLeakCount()
When a connection leak is observed, the monitoring statistics are displayed to the server.log. This method helps in segregating the statistics based on LOW/HIGH monitoring levels and displaying them.- Parameters:
poolName-stackTrace-
-
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()
-
-