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

## Class IntMetricImpl

- java.lang.Object
- - org.apache.ignite.internal.processors.metric.AbstractMetric
  - - org.apache.ignite.internal.processors.metric.impl.IntMetricImpl

All Implemented Interfaces:
  IntMetric, Metric

    public class IntMetricImpl
    extends AbstractMetric
    implements IntMetric

Int metric implementation.

### Constructor Summary

Constructors
Constructor and Description
`IntMetricImpl(String name, @Nullable String desc)`

### Method Summary

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

`getAsString`

### Methods inherited from interface org.apache.ignite.spi.metric.Metric

`description, name`

### Constructor Detail

#### IntMetricImpl

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

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

### Method Detail

#### add

    public void add(int x)

Adds x to the metric.

Parameters:
  `x` - Value to be added.

#### increment

    public void increment()

Adds 1 to the metric.

#### value

    public void value(int val)

Sets value.

Parameters:
  `val` - Value.

#### reset

    public void reset()

Resets metric state.

Specified by:
  `reset` in interface `Metric`

#### value

    public int value()

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

${current.year} Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Database and Caching Platform | : ver. 2.8.0
Release Date | : February 27 2020