Class AtomicLongMetric
- java.lang.Object
-
- org.apache.ignite.internal.processors.metric.AbstractMetric
-
- org.apache.ignite.internal.processors.metric.impl.AtomicLongMetric
-
- All Implemented Interfaces:
LongMetric,Metric
public class AtomicLongMetric extends AbstractMetric implements LongMetric
Long metric implementation.
-
-
Constructor Summary
Constructors Constructor Description AtomicLongMetric(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()voidvalue(long val)Sets value.-
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.
-
value
public void value(long val)
Sets value.- Parameters:
val- Value.
-
-