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

## Class ObjectGauge<T>

- java.lang.Object
- - org.apache.ignite.internal.processors.metric.AbstractMetric
  - - org.apache.ignite.internal.processors.metric.impl.ObjectGauge<T>

All Implemented Interfaces:
  Metric, ObjectMetric<T>

    public class ObjectGauge<T>
    extends AbstractMetric
    implements ObjectMetric<T>

Implementation based on primitive supplier.

### Constructor Summary

Constructors
Constructor and Description
`ObjectGauge(String name, @Nullable String desc, Supplier<T> val, Class<T> type)`

### Method Summary

All Methods Instance Methods Concrete Methods
`Class<T>` `type()`
`T` `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.ObjectMetric

`getAsString`

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

`description, name, reset`

### Constructor Detail

#### ObjectGauge

    public ObjectGauge(String name,
                       @Nullable
                       @Nullable String desc,
                       Supplier<T> val,
                       Class<T> type)

Parameters:
  `name` - Name.
  `desc` - Description.
  `val` - Supplier.
  `type` - Type.

### Method Detail

#### value

    public T value()

Specified by:
  `value` in interface `ObjectMetric<T>`
Returns:
  Value ot the metric.

#### type

    public Class<T> type()

Specified by:
  `type` in interface `ObjectMetric<T>`
Returns:
  Type of metric value.

${current.year} Copyright © Apache Software Foundation

Follow @ApacheIgnite

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