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 Details

    • JdbcConnPoolStatsProvider

      public JdbcConnPoolStatsProvider(org.glassfish.resourcebase.resources.api.PoolInfo poolInfo, Logger logger)
  • Method Details

    • 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 -
      steadyPoolSize -
    • incrementNumConnFreeEvent

      public void incrementNumConnFreeEvent(String poolName, String appName, String moduleName, boolean beingDestroyed, int steadyPoolSize)
      Increment numconnfree event
      Parameters:
      poolName -
      steadyPoolSize -
    • decrementConnectionUsedEvent

      public void decrementConnectionUsedEvent(String poolName, String appName, String moduleName)
      Decrement numConnUsed event
      Parameters:
      poolName -
      beingDestroyed - if the connection is destroyed due to error
      steadyPoolSize -
    • 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

      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()