Class ConnectionPoolEmitterImpl
- java.lang.Object
-
- com.sun.enterprise.resource.pool.monitor.ConnectionPoolEmitterImpl
-
- All Implemented Interfaces:
PoolLifeCycleListener
public class ConnectionPoolEmitterImpl extends Object implements PoolLifeCycleListener
Implementation of PoolLifeCycleListener interface to listen to events related to jdbc monitoring. The methods invoke the probe providers internally to provide the monitoring related information.- Author:
- Shalini M
-
-
Constructor Summary
Constructors Constructor Description ConnectionPoolEmitterImpl(PoolInfo poolInfo, ConnectionPoolProbeProvider provider)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidconnectionAcquired(long resourceHandleId)Fires probe event that a connection has been acquired by the application for the given jdbc connection pool.voidconnectionCreated()Fires probe event that a connection is created for the given jdbc connection pool.voidconnectionDestroyed(long resourceHandleId)Fires probe event that a connection is destroyed for the given jdbc connection pool.voidconnectionMatched()Fires probe event that a connection under test matches the current request for the given jdbc connection pool.voidconnectionNotMatched()Fires probe event that a connection under test does not match the current request for the given jdbc connection pool.voidconnectionReleased(long resourceHandleId)Fires probe event that a connection is released for the given jdbc connection pool.voidconnectionRequestDequeued()Fires probe event related to the fact the given jdbc connection pool's wait queue length has been decremented.voidconnectionRequestQueued()Fires probe event related to the fact the given jdbc connection pool's wait queue length has been incrementedvoidconnectionRequestServed(long timeTakenInMillis)Fires probe event related to the fact that a connection request is served in the timetimeTakenInMillisfor the given jdbc connection pool.voidconnectionsFreed(int count)Fires probe event related to the fact the given jdbc connection pool has got a connection freed event.voidconnectionTimedOut()Fires probe event related to the fact that the given jdbc connection pool has got a connection timed-out event.voidconnectionUsed(long resourceHandleId)Fires probe event related to the fact the given jdbc connection pool has got a connection used event.voidconnectionValidationFailed(int count)Fires probe event related to the fact the given jdbc connection pool has got a connection validation failed event.voiddecrementConnectionUsed(long resourceHandleId)Fires probe event related to the fact the given jdbc connection pool has got a decrement connection used event.voiddecrementNumConnFree()Fires probe event related to the fact the given jdbc connection pool has got a decrement free connections size event.voidfoundPotentialConnectionLeak()Fires probe event related to the fact that the given jdbc connection pool has got a connection leak event.voidincrementNumConnFree(boolean beingDestroyed, int steadyPoolSize)Fires probe event related to the fact the given jdbc connection pool has got a decrement free connections size event.voidtoString(StringBuilder stackTrace)Fires probe event that a stack trace is to be printed on the server.log.voidunregisterAppStatsProviders()Unregister the AppStatsProviders registered for this connection pool.
-
-
-
Constructor Detail
-
ConnectionPoolEmitterImpl
public ConnectionPoolEmitterImpl(PoolInfo poolInfo, ConnectionPoolProbeProvider provider)
Constructor- Parameters:
poolInfo- connection pool on whose behalf this emitter emits pool related probe eventsprovider-
-
-
Method Detail
-
toString
public void toString(StringBuilder stackTrace)
Fires probe event that a stack trace is to be printed on the server.log. The stack trace is mainly related to connection leak tracing for the given jdbc connection pool.- Specified by:
toStringin interfacePoolLifeCycleListener- Parameters:
stackTrace-
-
connectionAcquired
public void connectionAcquired(long resourceHandleId)
Fires probe event that a connection has been acquired by the application for the given jdbc connection pool.- Specified by:
connectionAcquiredin interfacePoolLifeCycleListener
-
connectionRequestServed
public void connectionRequestServed(long timeTakenInMillis)
Fires probe event related to the fact that a connection request is served in the timetimeTakenInMillisfor the given jdbc connection pool.- Specified by:
connectionRequestServedin interfacePoolLifeCycleListener- Parameters:
timeTakenInMillis- time taken to serve a connection
-
connectionTimedOut
public void connectionTimedOut()
Fires probe event related to the fact that the given jdbc connection pool has got a connection timed-out event.- Specified by:
connectionTimedOutin interfacePoolLifeCycleListener
-
connectionNotMatched
public void connectionNotMatched()
Fires probe event that a connection under test does not match the current request for the given jdbc connection pool.- Specified by:
connectionNotMatchedin interfacePoolLifeCycleListener
-
connectionMatched
public void connectionMatched()
Fires probe event that a connection under test matches the current request for the given jdbc connection pool.- Specified by:
connectionMatchedin interfacePoolLifeCycleListener
-
connectionDestroyed
public void connectionDestroyed(long resourceHandleId)
Fires probe event that a connection is destroyed for the given jdbc connection pool.- Specified by:
connectionDestroyedin interfacePoolLifeCycleListener
-
connectionReleased
public void connectionReleased(long resourceHandleId)
Fires probe event that a connection is released for the given jdbc connection pool.- Specified by:
connectionReleasedin interfacePoolLifeCycleListener
-
connectionCreated
public void connectionCreated()
Fires probe event that a connection is created for the given jdbc connection pool.- Specified by:
connectionCreatedin interfacePoolLifeCycleListener
-
foundPotentialConnectionLeak
public void foundPotentialConnectionLeak()
Fires probe event related to the fact that the given jdbc connection pool has got a connection leak event.- Specified by:
foundPotentialConnectionLeakin interfacePoolLifeCycleListener
-
connectionValidationFailed
public void connectionValidationFailed(int count)
Fires probe event related to the fact the given jdbc connection pool has got a connection validation failed event.- Specified by:
connectionValidationFailedin interfacePoolLifeCycleListener- Parameters:
count- number of times the validation failed
-
connectionUsed
public void connectionUsed(long resourceHandleId)
Fires probe event related to the fact the given jdbc connection pool has got a connection used event.- Specified by:
connectionUsedin interfacePoolLifeCycleListener
-
connectionsFreed
public void connectionsFreed(int count)
Fires probe event related to the fact the given jdbc connection pool has got a connection freed event.- Specified by:
connectionsFreedin interfacePoolLifeCycleListener- Parameters:
count- number of connections freed to pool
-
decrementConnectionUsed
public void decrementConnectionUsed(long resourceHandleId)
Fires probe event related to the fact the given jdbc connection pool has got a decrement connection used event.- Specified by:
decrementConnectionUsedin interfacePoolLifeCycleListener
-
decrementNumConnFree
public void decrementNumConnFree()
Fires probe event related to the fact the given jdbc connection pool has got a decrement free connections size event.- Specified by:
decrementNumConnFreein interfacePoolLifeCycleListener
-
incrementNumConnFree
public void incrementNumConnFree(boolean beingDestroyed, int steadyPoolSize)Fires probe event related to the fact the given jdbc connection pool has got a decrement free connections size event.- Specified by:
incrementNumConnFreein interfacePoolLifeCycleListener- Parameters:
beingDestroyed- if the connection is destroyed due to errorsteadyPoolSize-
-
connectionRequestQueued
public void connectionRequestQueued()
Fires probe event related to the fact the given jdbc connection pool's wait queue length has been incremented- Specified by:
connectionRequestQueuedin interfacePoolLifeCycleListener
-
connectionRequestDequeued
public void connectionRequestDequeued()
Fires probe event related to the fact the given jdbc connection pool's wait queue length has been decremented.- Specified by:
connectionRequestDequeuedin interfacePoolLifeCycleListener
-
unregisterAppStatsProviders
public void unregisterAppStatsProviders()
Unregister the AppStatsProviders registered for this connection pool.
-
-