Package org.apache.activemq.management
Class CountStatisticImpl
- java.lang.Object
-
- org.apache.activemq.management.StatisticImpl
-
- org.apache.activemq.management.CountStatisticImpl
-
- All Implemented Interfaces:
javax.management.j2ee.statistics.CountStatistic,javax.management.j2ee.statistics.Statistic,Resettable
public class CountStatisticImpl extends StatisticImpl implements javax.management.j2ee.statistics.CountStatistic
A count statistic implementation
-
-
Field Summary
-
Fields inherited from class org.apache.activemq.management.StatisticImpl
enabled
-
-
Constructor Summary
Constructors Constructor Description CountStatisticImpl(String name, String description)CountStatisticImpl(String name, String unit, String description)CountStatisticImpl(CountStatisticImpl parent, String name, String description)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(long amount)protected voidappendFieldDescription(StringBuffer buffer)voiddecrement()longgetCount()doublegetFrequency()CountStatisticImplgetParent()doublegetPeriod()voidincrement()voidreset()Reset the statisticvoidsetCount(long count)voidsetParent(CountStatisticImpl parent)voidsubtract(long amount)-
Methods inherited from class org.apache.activemq.management.StatisticImpl
getDescription, getLastSampleTime, getName, getStartTime, getUnit, isDoReset, isEnabled, setDoReset, setEnabled, toString, updateSampleTime
-
-
-
-
Method Detail
-
reset
public void reset()
Description copied from interface:ResettableReset the statistic- Specified by:
resetin interfaceResettable- Overrides:
resetin classStatisticImpl
-
getCount
public long getCount()
- Specified by:
getCountin interfacejavax.management.j2ee.statistics.CountStatistic
-
setCount
public void setCount(long count)
-
add
public void add(long amount)
-
increment
public void increment()
-
subtract
public void subtract(long amount)
-
decrement
public void decrement()
-
getParent
public CountStatisticImpl getParent()
-
setParent
public void setParent(CountStatisticImpl parent)
-
appendFieldDescription
protected void appendFieldDescription(StringBuffer buffer)
- Overrides:
appendFieldDescriptionin classStatisticImpl
-
getPeriod
public double getPeriod()
- Returns:
- the average time period that elapses between counter increments since the last reset.
-
getFrequency
public double getFrequency()
- Returns:
- the number of times per second that the counter is incrementing since the last reset.
-
-