|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.fusesource.commons.management.noop.StatisticImpl
public class StatisticImpl
An implementation of the Statistic interface that acts as a sink and does nothing.
Intended for use when no management is required.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.fusesource.commons.management.Statistic |
|---|
Statistic.UpdateMode |
| Constructor Summary | |
|---|---|
StatisticImpl()
|
|
| Method Summary | |
|---|---|
long |
getUpdateCount()
Gets the number of times the statistic has been updated since the last reset. |
long |
getValue()
Gets the current value of the statistic since the last reset. |
void |
increment()
Shorthand for updateValue(1). |
void |
reset()
Resets the statistic's value and update count to zero. |
void |
updateValue(long value)
Update statistic value. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public StatisticImpl()
| Method Detail |
|---|
public long getValue()
Statistic
getValue in interface Statisticpublic long getUpdateCount()
Statistic
getUpdateCount in interface Statisticpublic void increment()
Statistic
increment in interface Statisticpublic void updateValue(long value)
StatisticStatistic.UpdateMode
updateValue in interface Statisticvalue - the valuepublic void reset()
Statistic
reset in interface Statistic
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||