public class StatisticImpl extends Object implements Statistic, Resettable
Modifier and Type | Field and Description |
---|---|
protected boolean |
enabled |
Constructor and Description |
---|
StatisticImpl(String name,
String unit,
String description) |
Modifier and Type | Method and Description |
---|---|
protected void |
appendFieldDescription(StringBuffer buffer) |
String |
getDescription() |
long |
getLastSampleTime() |
String |
getName() |
long |
getStartTime() |
String |
getUnit() |
boolean |
isDoReset() |
boolean |
isEnabled() |
void |
reset()
Reset the statistic
|
void |
setDoReset(boolean doReset) |
void |
setEnabled(boolean enabled) |
String |
toString() |
protected void |
updateSampleTime() |
protected boolean enabled
public StatisticImpl(String name, String unit, String description)
public void reset()
Resettable
reset
in interface Resettable
protected void updateSampleTime()
public String getDescription()
getDescription
in interface Statistic
public long getStartTime()
getStartTime
in interface Statistic
public long getLastSampleTime()
getLastSampleTime
in interface Statistic
public boolean isEnabled()
public void setEnabled(boolean enabled)
enabled
- the enabled to setpublic boolean isDoReset()
public void setDoReset(boolean doReset)
doReset
- the doReset to setprotected void appendFieldDescription(StringBuffer buffer)
Copyright © 2005–2016 FuseSource, Corp.. All rights reserved.