org.fusesource.commons.management
Interface Statistic

All Known Implementing Classes:
StatisticImpl, StatisticImpl

public interface Statistic

Statistic implementations provide a raw data collection medium.


Nested Class Summary
static class Statistic.UpdateMode
           VALUE - A statistic with this update mode is a simple value that is a straight forward representation of the updated value.
 
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.
 

Method Detail

increment

void increment()
Shorthand for updateValue(1).


updateValue

void updateValue(long value)
Update statistic value. The update will be applied according to the Statistic.UpdateMode

Parameters:
value - the value

getValue

long getValue()
Gets the current value of the statistic since the last reset.

Returns:
the value

getUpdateCount

long getUpdateCount()
Gets the number of times the statistic has been updated since the last reset.

Returns:
the update count

reset

void reset()
Resets the statistic's value and update count to zero.



Copyright © 2009 FuseSource. All Rights Reserved.