Package org.jitsi.metrics
Class DoubleGaugeMetric
-
- All Implemented Interfaces:
public final class DoubleGaugeMetric extends Metric<Double>
A double metric wrapper for Prometheus Gauges. Provides atomic operations such as incAndGet.
-
-
Constructor Summary
Constructors Constructor Description DoubleGaugeMetric(String name, String help, String namespace, Double initialValue)DoubleGaugeMetric(String name, String help, String namespace)
-
Method Summary
Modifier and Type Method Description StringgetName()the name of this metric Doubleget()Supplies the current value of this metric. final Unitset(Double newValue)Sets the value of this gauge to the given value. final DoublesetAndGet(Double newValue)Atomically sets the gauge to the given value, returning the updated value. final DoubleaddAndGet(Double delta)Atomically adds the given value to this gauge, returning the updated value. final DoubleincAndGet()Atomically increments the value of this gauge by one, returning the updated value. final DoubledecAndGet()Atomically decrements the value of this gauge by one, returning the updated value. -
-
Method Detail
-
setAndGet
final Double setAndGet(Double newValue)
Atomically sets the gauge to the given value, returning the updated value.
- Returns:
the updated value
-
addAndGet
final Double addAndGet(Double delta)
Atomically adds the given value to this gauge, returning the updated value.
- Returns:
the updated value
-
incAndGet
final Double incAndGet()
Atomically increments the value of this gauge by one, returning the updated value.
- Returns:
the updated value
-
-
-
-