Package org.apache.activemq.management
Class CountStatisticImpl
java.lang.Object
org.apache.activemq.management.StatisticImpl
org.apache.activemq.management.CountStatisticImpl
- All Implemented Interfaces:
CountStatistic
,Resettable
,Statistic
A count statistic implementation
-
Field Summary
Fields inherited from class org.apache.activemq.management.StatisticImpl
enabled
-
Constructor Summary
ConstructorsConstructorDescriptionCountStatisticImpl
(String name, String description) CountStatisticImpl
(String name, String unit, String description) CountStatisticImpl
(CountStatisticImpl parent, String name, String description) -
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(long amount) protected void
appendFieldDescription
(StringBuffer buffer) void
long
getCount()
double
double
void
void
reset()
Reset the statisticvoid
setCount
(long count) void
setParent
(CountStatisticImpl parent) void
subtract
(long amount) Methods inherited from class org.apache.activemq.management.StatisticImpl
getDescription, getLastSampleTime, getName, getStartTime, getUnit, isDoReset, isEnabled, setDoReset, setEnabled, toString, updateSampleTime
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.apache.activemq.management.Statistic
getDescription, getLastSampleTime, getName, getStartTime, getUnit
-
Constructor Details
-
CountStatisticImpl
-
CountStatisticImpl
-
CountStatisticImpl
-
-
Method Details
-
reset
public void reset()Description copied from interface:Resettable
Reset the statistic- Specified by:
reset
in interfaceResettable
- Overrides:
reset
in classStatisticImpl
-
getCount
public long getCount()- Specified by:
getCount
in interfaceCountStatistic
-
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
-
setParent
-
appendFieldDescription
- Overrides:
appendFieldDescription
in 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.
-