Class LongAdderMetric
- java.lang.Object
-
- org.apache.ignite.internal.processors.metric.AbstractMetric
-
- org.apache.ignite.internal.processors.metric.impl.LongAdderMetric
-
- All Implemented Interfaces:
LongMetric,Metric
- Direct Known Subclasses:
LongAdderWithDelegateMetric
public class LongAdderMetric extends AbstractMetric implements LongMetric
Long metric implementation based onLongAdder.
-
-
Constructor Summary
Constructors Constructor Description LongAdderMetric(String name, @Nullable String desc)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(long x)Adds x to the metric.voiddecrement()Adds -1 to the metric.voidincrement()Adds 1 to the metric.voidreset()Resets metric state.longvalue()-
Methods inherited from class org.apache.ignite.internal.processors.metric.AbstractMetric
description, equals, hashCode, name
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.ignite.spi.metric.LongMetric
getAsString
-
Methods inherited from interface org.apache.ignite.spi.metric.Metric
description, name
-
-
-
-
Method Detail
-
add
public void add(long x)
Adds x to the metric.- Parameters:
x- Value to be added.
-
increment
public void increment()
Adds 1 to the metric.
-
decrement
public void decrement()
Adds -1 to the metric.
-
value
public long value()
- Specified by:
valuein interfaceLongMetric- Returns:
- Value of the metric.
-
-