|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.fusesource.commons.management.basic.StatisticImpl
public class StatisticImpl
Basic implementation of the Statistic interface.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.fusesource.commons.management.Statistic |
|---|
Statistic.UpdateMode |
| Constructor Summary | |
|---|---|
StatisticImpl(Statistic.UpdateMode updateMode)
Instantiates a new simple statistic. |
|
| 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. |
java.lang.String |
toString()
|
void |
updateValue(long newValue)
Update statistic value. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public StatisticImpl(Statistic.UpdateMode updateMode)
updateMode - The statistic update mode.| Method Detail |
|---|
public void updateValue(long newValue)
StatisticStatistic.UpdateMode
updateValue in interface StatisticnewValue - the valuepublic void increment()
Statistic
increment in interface Statisticpublic long getValue()
Statistic
getValue in interface Statisticpublic long getUpdateCount()
Statistic
getUpdateCount in interface Statisticpublic void reset()
Statistic
reset in interface Statisticpublic java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||