站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss 4.0.1 sp1 management API Documentation 英文版文档

CountStatisticImpl (JBoss/Management API) - JBoss 4.0.1 sp1 management API Documentation 英文版文档


org.jboss.management.j2ee.statistics
Class CountStatisticImpl

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

public class CountStatisticImpl
extends StatisticImpl
implements javax.management.j2ee.statistics.CountStatistic

This class is the JBoss specific Counter Statistics class

Version:
$Revision: 1.4 $
Author:
Marc Fleury, Andreas Schaefer
See Also:
Serialized Form

Field Summary
protected  long count
           
 
Fields inherited from class org.jboss.management.j2ee.statistics.StatisticImpl
description, lastSampleTime, name, startTime, units
 
Constructor Summary
CountStatisticImpl(String name, String units, 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
 String toString()
           
 
Methods inherited from class org.jboss.management.j2ee.statistics.StatisticImpl
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
getDescription, getLastSampleTime, getName, getStartTime, getUnit
 

Field Detail

count

protected long count
Constructor Detail

CountStatisticImpl

public CountStatisticImpl(String name,
                          String units,
                          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: javax.management.j2ee.statistics.CountStatistic
The count since the last reset.

Specified by:
getCount in interface javax.management.j2ee.statistics.CountStatistic
Returns:
The value of Count

toString

public String toString()
Overrides:
toString in class StatisticImpl
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

set

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

Parameters:
count - the new count


Copyright © 2002 JBoss Group, LLC. All Rights Reserved.