Package org.jitsi.metrics
Class LongGaugeMetric
-
- All Implemented Interfaces:
public final class LongGaugeMetric extends Metric<Long>
A long metric wrapper for Prometheus Gauges. Provides atomic operations such as incAndGet.
-
-
Constructor Summary
Constructors Constructor Description LongGaugeMetric(String name, String help, String namespace, Long initialValue)LongGaugeMetric(String name, String help, String namespace)
-
Method Summary
Modifier and Type Method Description StringgetName()the name of this metric Longget()Supplies the current value of this metric. final Unitset(Long newValue)Atomically sets the gauge to the given value. final Unitinc()Atomically increments the value of this gauge by one. final Unitdec()Atomically decrements the value of this gauge by one. final LongaddAndGet(Long delta)Atomically adds the given value to this gauge, returning the updated value. final LongincAndGet()Atomically increments the value of this gauge by one, returning the updated value. final LongdecAndGet()Atomically decrements the value of this gauge by one, returning the updated value. -
-
Method Detail
-
addAndGet
final Long addAndGet(Long delta)
Atomically adds the given value to this gauge, returning the updated value.
- Returns:
the updated value
-
incAndGet
final Long incAndGet()
Atomically increments the value of this gauge by one, returning the updated value.
- Returns:
the updated value
-
-
-
-