org.jboss.management.j2ee.statistics
Class CountStatisticImpl

java.lang.Object
  extended byorg.jboss.management.j2ee.statistics.StatisticImpl (src) 
      extended byorg.jboss.management.j2ee.statistics.CountStatisticImpl
All Implemented Interfaces:
CountStatistic (src) , java.io.Serializable, Statistic (src)

public class CountStatisticImpl
extends StatisticImpl (src)
implements CountStatistic (src)

This class is the JBoss specific Counter Statistics class

See Also:
Serialized Form

Field Summary
protected  long count
           
 
Fields inherited from class org.jboss.management.j2ee.statistics.StatisticImpl (src)
description, lastSampleTime, name, startTime, units
 
Constructor Summary
CountStatisticImpl(java.lang.String name, java.lang.String units, java.lang.String description)
          Create a CountStatistic
 
Method Summary
 void add()
          Adds a hit to this counter
 long getCount()
          The count since the last reset.
 void remove()
          Removes a hit to this counter
 void reset()
          Resets the statistics to the initial values
 void set(long count)
          Set the current value of the count
 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

count

protected long count
Constructor Detail

CountStatisticImpl

public CountStatisticImpl(java.lang.String name,
                          java.lang.String units,
                          java.lang.String description)
Create a CountStatistic

Parameters:
name - the name of the state
units - the units of the stat
description - a description of the stat
Method Detail

getCount

public long getCount()
Description copied from interface: CountStatistic (src)
The count since the last reset.

Specified by:
getCount in interface CountStatistic (src)
Returns:
The value of Count

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 count)
Set the current value of the count

Parameters:
count - the new count