Package com.gigaspaces.metrics
Class Gauge<T>
java.lang.Object
com.gigaspaces.metrics.Metric
com.gigaspaces.metrics.Gauge<T>
- Type Parameters:
T- the type of the metric's value
- Direct Known Subclasses:
InternalGauge,LatencyGauge
Deprecated.
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();
}
};
- Since:
- 10.1
- Author:
- Niv Ingberg
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected doublecalculatePercent(long value, long total) Deprecated.abstract TgetValue()Deprecated.Returns the metric's current value.protected static Doublevalidate(double value) Deprecated.
-
Constructor Details
-
Gauge
public Gauge()Deprecated.
-
-
Method Details
-
getValue
Deprecated.Returns the metric's current value.- Returns:
- the metric's current value
- Throws:
Exception
-
calculatePercent
protected double calculatePercent(long value, long total) Deprecated. -
validate
Deprecated.
-
Gaugeinstead. Register viaio.micrometer.core.instrument.Gauge.builder(...).register(meterRegistry).