com.jamonapi
Class ActiveStatsMonitor

java.lang.Object
  |
  +--com.jamonapi.AccumulateMonitor
        |
        +--com.jamonapi.ActiveStatsMonitor
All Implemented Interfaces:
AccumulateMonitorInterface, MinimalMonitor

public class ActiveStatsMonitor
extends AccumulateMonitor

Tracks statistics for Monitors that are currently running. The statistics tracked are how often this Monitor is called (hits), how many outstanding invocations of start() have been called without a stop() for this instance (active), what is the average number of active for this instance, and what was the maximum number of active for this instance.


Constructor Summary
ActiveStatsMonitor()
           
ActiveStatsMonitor(AccumulateMonitorInterface childMonitor)
          Constructor that uses the Gang Of 4's decorator pattern.
 
Method Summary
 long getAccrued()
          Return the number of Active Monitors of this instance
static void main(java.lang.String[] args)
          Method that contains test data for this class
 
Methods inherited from class com.jamonapi.AccumulateMonitor
getAccruedString, getData, getHeader, getType, getUnits, increase, increase, isPrimary, reset, setPrimary, start, stop, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ActiveStatsMonitor

public ActiveStatsMonitor()

ActiveStatsMonitor

public ActiveStatsMonitor(AccumulateMonitorInterface childMonitor)
Constructor that uses the Gang Of 4's decorator pattern.

Method Detail

getAccrued

public long getAccrued()
Return the number of Active Monitors of this instance

Specified by:
getAccrued in interface MinimalMonitor
Overrides:
getAccrued in class AccumulateMonitor

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Method that contains test data for this class

java.lang.Exception