com.twitter.common.metrics
Interface Gauge<T extends Number>

Type Parameters:
T - Value type.
All Known Implementing Classes:
AbstractGauge

public interface Gauge<T extends Number>

A metric that has a name and a variable number value.


Method Summary
 String getName()
          Gets the name of this stat.
 T read()
          Reads the latest value of the metric.
 

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()
Reads the latest value of the metric. Must never return null.

Returns:
The metric value.