com.twitter.common.stats
Interface Stat<T>

All Known Implementing Classes:
MovingAverage, MovingWindowDelta, Rate, Ratio, SampledStat, StatImpl

public interface Stat<T>

A stat that may only be read, no method calls will cause any internal state changes.


Method Summary
 String getName()
          Gets the name of this stat.
 T read()
          Retrieves the most recent value of the stat.
 

Method Detail

getName

String getName()
Gets the name of this stat. For sake of convention, variable names should be alphanumeric, and use underscores.

Returns:
The variable name.

read

T read()
Retrieves the most recent value of the stat.

Returns:
The most recent value.