Class HistogramMetricImpl
- java.lang.Object
-
- org.apache.ignite.internal.processors.metric.AbstractMetric
-
- org.apache.ignite.internal.processors.metric.impl.HistogramMetricImpl
-
- All Implemented Interfaces:
ConfigurableHistogramMetric,HistogramMetric,Metric,ObjectMetric<long[]>
public class HistogramMetricImpl extends AbstractMetric implements ConfigurableHistogramMetric
Histogram metric implementation.
-
-
Constructor Summary
Constructors Constructor Description HistogramMetricImpl(String name, @Nullable String desc, long[] bounds)HistogramMetricImpl(String name, HistogramMetricImpl toCopy)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long[]bounds()voidbounds(long[] bounds)Sets bounds for this histogram.@Nullable StringgetAsString()voidreset()Resets metric state.voidreset(long[] bounds)Resets histogram state with the specified bounds.Class<long[]>type()long[]value()voidvalue(long x)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.Metric
description, name
-
-
-
-
Constructor Detail
-
HistogramMetricImpl
public HistogramMetricImpl(String name, @Nullable @Nullable String desc, long[] bounds)
- Parameters:
name- Name.desc- Description.bounds- Bounds.
-
HistogramMetricImpl
public HistogramMetricImpl(String name, HistogramMetricImpl toCopy)
- Parameters:
name- Name.toCopy- Histogram metric to copy.
-
-
Method Detail
-
value
public void value(long x)
Sets value.- Parameters:
x- Value.
-
reset
public void reset(long[] bounds)
Resets histogram state with the specified bounds.- Parameters:
bounds- Bounds.
-
bounds
public void bounds(long[] bounds)
Sets bounds for this histogram.- Specified by:
boundsin interfaceConfigurableHistogramMetric
-
value
public long[] value()
- Specified by:
valuein interfaceObjectMetric<long[]>- Returns:
- Value ot the metric.
-
getAsString
@Nullable public @Nullable String getAsString()
- Specified by:
getAsStringin interfaceMetric- Specified by:
getAsStringin interfaceObjectMetric<long[]>- Returns:
- String representation of metric value.
-
bounds
public long[] bounds()
- Specified by:
boundsin interfaceHistogramMetric- Returns:
- Bounds of this histogram.
-
type
public Class<long[]> type()
- Specified by:
typein interfaceObjectMetric<long[]>- Returns:
- Type of metric value.
-
-