Class Value
- java.lang.Object
-
- org.apache.kafka.common.metrics.stats.Value
-
- All Implemented Interfaces:
Measurable
,MeasurableStat
,MetricValueProvider<Double>
,Stat
public class Value extends Object implements MeasurableStat
An instantaneous value.
-
-
Constructor Summary
Constructors Constructor Description Value()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
measure(MetricConfig config, long now)
Measure this quantity and return the result as a doublevoid
record(MetricConfig config, double value, long timeMs)
Record the given value
-
-
-
Method Detail
-
measure
public double measure(MetricConfig config, long now)
Description copied from interface:Measurable
Measure this quantity and return the result as a double- Specified by:
measure
in interfaceMeasurable
- Parameters:
config
- The configuration for this metricnow
- The POSIX time in milliseconds the measurement is being taken- Returns:
- The measured value
-
record
public void record(MetricConfig config, double value, long timeMs)
Description copied from interface:Stat
Record the given value
-
-