T - the type of the metric's valuepublic interface Gauge<T> extends Metric
A gauge metric is an instantaneous reading of a particular value. To instrument a queue's depth,
for example:
final Queue<String> queue = new ConcurrentLinkedQueue<String>();
final Gauge<Integer> queueDepth = new Gauge<Integer>() {
public Integer getValue() {
return queue.size();
}
};
| Modifier and Type | Method and Description |
|---|---|
T |
getValue()
Returns the metric's current value.
|
lastUpdateTimeT getValue()
Copyright © 2011–2019 The Apache Software Foundation. All rights reserved.