T
- Instance to be wrapped in the gauge for metering.public class Gauge<T> extends java.lang.Object implements Metric
Metric
that wraps some instance of T in a thread-safe
reference and allows it to be set or retrieved. Gauages record specific values over time.
For example, the current length of a queue or the size of a buffer.public Gauge(java.lang.String name, T value)
public T getValue()
public java.lang.String getName()
public void visit(MetricsVisitor visitor)
public java.lang.String toString()
toString
in class java.lang.Object