org.apache.ignite.internal.processors.metric.impl

## 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 and Description
`AtomicLongMetric(String name, @Nullable String desc)`

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `add(long x)` Adds x to the metric.
`void` `decrement()` Adds -1 to the metric.
`void` `increment()` Adds 1 to the metric.
`void` `reset()` Resets metric state.
`long` `value()`
`void` `value(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`

### Constructor Detail

#### AtomicLongMetric

    public AtomicLongMetric(String name,
                            @Nullable
                            @Nullable String desc)

Parameters:
  `name` - Name.
  `desc` - Description.

### 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.

#### reset

    public void reset()

Resets metric state.

Specified by:
  `reset` in interface `Metric`

#### value

    public long value()

Specified by:
  `value` in interface `LongMetric`
Returns:
  Value of the metric.

#### value

    public void value(long val)

Sets value.

Parameters:
  `val` - Value.

${current.year} Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Database and Caching Platform | : ver. 2.15.0
Release Date | : April 25 2023