org.jboss.management.j2ee.statistics
Class BoundedRangeStatisticImpl

java.lang.Object
  extended byorg.jboss.management.j2ee.statistics.StatisticImpl (src) 
      extended byorg.jboss.management.j2ee.statistics.BoundedRangeStatisticImpl
All Implemented Interfaces:
BoundaryStatistic (src) , BoundedRangeStatistic (src) , RangeStatistic (src) , java.io.Serializable, Statistic (src)

public class BoundedRangeStatisticImpl
extends StatisticImpl (src)
implements BoundedRangeStatistic (src)

This class is the JBoss specific BoundedRangeStatistic implementation

See Also:
Serialized Form

Field Summary
protected  BoundaryStatisticImpl (src) boundaryStat
           
protected  RangeStatisticImpl (src) rangeStat
           
 
Fields inherited from class org.jboss.management.j2ee.statistics.StatisticImpl (src)
description, lastSampleTime, name, startTime, units
 
Constructor Summary
BoundedRangeStatisticImpl(java.lang.String name, java.lang.String units, java.lang.String description, long lowerBound, long upperBound)
          Create a named BoundedRangeStatistic with the given upper and lower bounds.
 
Method Summary
 void add()
          Adds a hit to this counter
 long getCurrent()
          The current value of this attribute.
 long getHighWaterMark()
          The highest value this attribute has held since the beginning of the measurement.
 long getLowerBound()
          The lower limit of the value of this attribute.The upper limit of the value of this attribute.
 long getLowWaterMark()
          The lowest value this attribute has held since the beginning of the measurement.
 long getUpperBound()
          The upper limit of the value of this attribute.
 void remove()
          Removes a hit to this counter
 void reset()
          Resets the statistics to the initial values
 void set(long current)
          Set the current value of the RangeStatistic
 java.lang.String toString()
           
 
Methods inherited from class org.jboss.management.j2ee.statistics.StatisticImpl (src)
getDescription, getLastSampleTime, getName, getStartTime, getUnit, set
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface javax.management.j2ee.statistics.Statistic (src)
getDescription, getLastSampleTime, getName, getStartTime, getUnit
 

Field Detail

boundaryStat

protected BoundaryStatisticImpl (src)  boundaryStat

rangeStat

protected RangeStatisticImpl (src)  rangeStat
Constructor Detail

BoundedRangeStatisticImpl

public BoundedRangeStatisticImpl(java.lang.String name,
                                 java.lang.String units,
                                 java.lang.String description,
                                 long lowerBound,
                                 long upperBound)
Create a named BoundedRangeStatistic with the given upper and lower bounds.

Parameters:
name - the name of the statistic
units - the units of the statistic
description - the description of the statistic
lowerBound - the lower bound the statistic will attain
upperBound - the upper bound the statistic will attain
Method Detail

getCurrent

public long getCurrent()
Description copied from interface: RangeStatistic (src)
The current value of this attribute.

Specified by:
getCurrent in interface RangeStatistic (src)
Returns:
The value of Current

getHighWaterMark

public long getHighWaterMark()
Description copied from interface: RangeStatistic (src)
The highest value this attribute has held since the beginning of the measurement.

Specified by:
getHighWaterMark in interface RangeStatistic (src)
Returns:
The value of HighWaterMark

getLowWaterMark

public long getLowWaterMark()
Description copied from interface: RangeStatistic (src)
The lowest value this attribute has held since the beginning of the measurement.

Specified by:
getLowWaterMark in interface RangeStatistic (src)
Returns:
The value of LowWaterMark

getLowerBound

public long getLowerBound()
Description copied from interface: BoundaryStatistic (src)
The lower limit of the value of this attribute.The upper limit of the value of this attribute.

Specified by:
getLowerBound in interface BoundaryStatistic (src)
Returns:
The value of Lower Bound

getUpperBound

public long getUpperBound()
Description copied from interface: BoundaryStatistic (src)
The upper limit of the value of this attribute.

Specified by:
getUpperBound in interface BoundaryStatistic (src)
Returns:
The value of Upper Bound

toString

public java.lang.String toString()
Overrides:
toString in class StatisticImpl (src)
Returns:
Debug Information about this Instance

add

public void add()
Adds a hit to this counter


remove

public void remove()
Removes a hit to this counter


reset

public void reset()
Resets the statistics to the initial values

Overrides:
reset in class StatisticImpl (src)

set

public void set(long current)
Set the current value of the RangeStatistic

Parameters:
current - the new current value