@ProbeListener(DOTTED_NAME + "workProcessingCompleted") public void workProcessingCompleted( @ProbeParam("raName") String raName ) { if (isValidEvent(raName)) { synchronized (activeWorkCount) { activeWorkCount.setCurrent(activeWorkCount.getCurrent() - 1); } } }
public DeploymentLifecycleStatsProvider() { long curTime = System.currentTimeMillis(); activeApplicationsDeployedCount = new RangeStatisticImpl( 0L, 0L, 0L, "ActiveApplicationsDeployed", StatisticImpl.UNIT_COUNT, ACTIVE_APPLICATIONS_DEPLOYED_DESCRIPTION, curTime, curTime); totalApplicationsDeployedCount = new CountStatisticImpl( "TotalApplicationsDeployed", StatisticImpl.UNIT_COUNT, TOTAL_APPLICATIONS_DEPLOYED_DESCRIPTION); }
@ManagedAttribute(id="connrequestwaittime") public RangeStatistic getConnRequestWaitTime() { return connRequestWaitTime.getStatistic(); }
/** * 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. */ @Reset public void reset() { if(logger.isLoggable(Level.FINEST)) { logger.finest("Reset event received - poolName = " + poolInfo); } PoolStatus status = ConnectorRuntime.getRuntime().getPoolManager().getPoolStatus(poolInfo); numConnUsed.setCurrent(status.getNumConnUsed()); numConnFree.setCurrent(status.getNumConnFree()); numConnCreated.reset(); numConnDestroyed.reset(); numConnFailedValidation.reset(); numConnTimedOut.reset(); numConnAcquired.reset(); numConnReleased.reset(); connRequestWaitTime.reset(); numConnSuccessfullyMatched.reset(); numConnNotSuccessfullyMatched.reset(); numPotentialConnLeak.reset(); averageConnWaitTime.reset(); totalConnRequestWaitTime.reset(); waitQueueLength.reset(); }
@ProbeListener(DOTTED_NAME + "workWaitedFor") public void workWaitedFor( @ProbeParam("raName") String raName, @ProbeParam("elapsedTime") long elapsedTime ) { if (isValidEvent(raName)) { workRequestWaitTime.setCurrent(elapsedTime); } }
stackTrace.append("\n curNumConnUsed = " + numConnUsed.getCurrent()); stackTrace.append("\n curNumConnFree = " + numConnFree.getCurrent()); stackTrace.append("\n numConnCreated = " + numConnCreated.getCount()); stackTrace.append("\n numConnDestroyed = " + numConnDestroyed.getCount());
/** * 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. */ @Reset public void reset() { if(logger.isLoggable(Level.FINEST)) { logger.finest("Reset event received - poolInfo = " + poolInfo); } PoolStatus status = ConnectorRuntime.getRuntime().getPoolManager().getPoolStatus(poolInfo); numConnUsed.setCurrent(status.getNumConnUsed()); numConnFree.setCurrent(status.getNumConnFree()); numConnCreated.reset(); numConnDestroyed.reset(); numConnFailedValidation.reset(); numConnTimedOut.reset(); numConnAcquired.reset(); numConnReleased.reset(); connRequestWaitTime.reset(); numConnSuccessfullyMatched.reset(); numConnNotSuccessfullyMatched.reset(); numPotentialConnLeak.reset(); averageConnWaitTime.reset(); totalConnRequestWaitTime.reset(); waitQueueLength.reset(); }
/** * Event that a connection request is served in timeTakenInMillis. * * @param poolName * @param timeTakenInMillis */ @ProbeListener(JCA_PROBE_LISTENER + "connectionRequestServedEvent") public void connectionRequestServedEvent( @ProbeParam("poolName") String poolName, @ProbeParam("appName") String appName, @ProbeParam("moduleName") String moduleName, @ProbeParam("timeTakenInMillis") long timeTakenInMillis) { PoolInfo poolInfo = new PoolInfo(poolName, appName, moduleName); if(this.poolInfo.equals(poolInfo)) { if(logger.isLoggable(Level.FINEST)) { logger.finest("Connection request served event received - " + "poolName = " + poolName); } connRequestWaitTime.setCurrent(timeTakenInMillis); totalConnRequestWaitTime.increment(timeTakenInMillis); } }
stackTrace.append("\n curNumConnUsed = " + numConnUsed.getCurrent()); stackTrace.append("\n curNumConnFree = " + numConnFree.getCurrent()); stackTrace.append("\n numConnCreated = " + numConnCreated.getCount()); stackTrace.append("\n numConnDestroyed = " + numConnDestroyed.getCount());
@ProbeListener(JCA_APP_PROBE_LISTENER + "decrementConnectionUsedEvent") public void decrementConnectionUsedEvent( @ProbeParam("poolName") String poolName, @ProbeParam("appName") String appName) { // handle the num conn used decrement event if((poolName != null) && (poolName.equals(this.poolName))) { if (appName != null && appName.equals(this.appName)) { //Decrement numConnUsed counter synchronized (numConnUsed) { numConnUsed.setCurrent(numConnUsed.getCurrent() - 1); } } } }
/** * Event that a connection request is served in timeTakenInMillis. * * @param poolName * @param timeTakenInMillis */ @ProbeListener(JDBC_PROBE_LISTENER + "connectionRequestServedEvent") public void connectionRequestServedEvent( @ProbeParam("poolName") String poolName, @ProbeParam("appName") String appName, @ProbeParam("moduleName") String moduleName, @ProbeParam("timeTakenInMillis") long timeTakenInMillis) { PoolInfo poolInfo = new PoolInfo(poolName, appName, moduleName); if(this.poolInfo.equals(poolInfo)) { if(logger.isLoggable(Level.FINEST)) { logger.finest("Connection request served event received - " + "poolName = " + poolName); } connRequestWaitTime.setCurrent(timeTakenInMillis); totalConnRequestWaitTime.increment(timeTakenInMillis); } }
@ManagedAttribute(id="numconnused") public RangeStatistic getNumConnUsed() { return numConnUsed.getStatistic(); }
@ProbeListener(JDBC_APP_PROBE_LISTENER + "decrementConnectionUsedEvent") public void decrementConnectionUsedEvent( @ProbeParam("poolName") String poolName, @ProbeParam("appName") String appName) { // handle the num conn used decrement event if((poolName != null) && (poolName.equals(this.poolName))) { if (appName != null && appName.equals(this.appName)) { //Decrement numConnUsed counter synchronized (numConnUsed) { numConnUsed.setCurrent(numConnUsed.getCurrent() - 1); } } } }
@ManagedAttribute(id="numconnused") public RangeStatistic getNumConnUsed() { return numConnUsed.getStatistic(); }
@ProbeListener(DOTTED_NAME + "workQueued") public void workQueued( @ProbeParam("raName") String raName ) { if (isValidEvent(raName)) { synchronized (waitQueueLength) { waitQueueLength.setCurrent(waitQueueLength.getCurrent() + 1); } } }
@ManagedAttribute(id="numconnfree") public RangeStatistic getNumConnFree() { return numConnFree.getStatistic(); }
@ProbeListener(DOTTED_NAME + "workDequeued") public void workDequeued( @ProbeParam("raName") String raName ) { if (isValidEvent(raName)) { synchronized (waitQueueLength) { waitQueueLength.setCurrent(waitQueueLength.getCurrent() - 1); } } }
@ManagedAttribute(id="connrequestwaittime") public RangeStatistic getConnRequestWaitTime() { return connRequestWaitTime.getStatistic(); }
@ProbeListener(DOTTED_NAME + "workProcessingStarted") public void workProcessingStarted( @ProbeParam("raName") String raName ) { if (isValidEvent(raName)) { synchronized (activeWorkCount) { activeWorkCount.setCurrent(activeWorkCount.getCurrent() + 1); } } }
@ManagedAttribute(id="numconnused") public RangeStatistic getNumConnUsed() { return numConnUsed.getStatistic(); }