Package org.apache.activemq.management
Class StatisticImpl
- java.lang.Object
-
- org.apache.activemq.management.StatisticImpl
-
- All Implemented Interfaces:
Statistic
,Resettable
- Direct Known Subclasses:
BoundaryStatisticImpl
,CountStatisticImpl
,PollCountStatisticImpl
,RangeStatisticImpl
,SizeStatisticImpl
,StatsImpl
,TimeStatisticImpl
public class StatisticImpl extends Object implements Statistic, Resettable
Base class for a Statistic implementation
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
enabled
-
Constructor Summary
Constructors Constructor Description StatisticImpl(String name, String unit, String description)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
appendFieldDescription(StringBuffer buffer)
String
getDescription()
long
getLastSampleTime()
String
getName()
long
getStartTime()
String
getUnit()
boolean
isDoReset()
boolean
isEnabled()
void
reset()
Reset the statisticvoid
setDoReset(boolean doReset)
void
setEnabled(boolean enabled)
String
toString()
protected void
updateSampleTime()
-
-
-
Method Detail
-
reset
public void reset()
Description copied from interface:Resettable
Reset the statistic- Specified by:
reset
in interfaceResettable
-
updateSampleTime
protected void updateSampleTime()
-
getDescription
public String getDescription()
- Specified by:
getDescription
in interfaceStatistic
-
getStartTime
public long getStartTime()
- Specified by:
getStartTime
in interfaceStatistic
-
getLastSampleTime
public long getLastSampleTime()
- Specified by:
getLastSampleTime
in interfaceStatistic
-
isEnabled
public boolean isEnabled()
- Returns:
- the enabled
-
setEnabled
public void setEnabled(boolean enabled)
- Parameters:
enabled
- the enabled to set
-
isDoReset
public boolean isDoReset()
- Returns:
- the doReset
-
setDoReset
public void setDoReset(boolean doReset)
- Parameters:
doReset
- the doReset to set
-
appendFieldDescription
protected void appendFieldDescription(StringBuffer buffer)
-
-