Class CumulativeSum
- java.lang.Object
-
- org.apache.kafka.common.metrics.stats.CumulativeSum
-
- All Implemented Interfaces:
Measurable,MeasurableStat,MetricValueProvider<Double>,Stat
- Direct Known Subclasses:
CumulativeCount,Total
public class CumulativeSum extends Object implements MeasurableStat
An non-sampled cumulative total maintained over all time. This is a non-sampled version ofWindowedSum. See alsoCumulativeCountif you just want to increment the value by 1 on each recording.
-
-
Constructor Summary
Constructors Constructor Description CumulativeSum()CumulativeSum(double value)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description doublemeasure(MetricConfig config, long now)Measure this quantity and return the result as a doublevoidrecord(MetricConfig config, double value, long now)Record the given value
-
-
-
Method Detail
-
record
public void record(MetricConfig config, double value, long now)
Description copied from interface:StatRecord the given value
-
measure
public double measure(MetricConfig config, long now)
Description copied from interface:MeasurableMeasure this quantity and return the result as a double- Specified by:
measurein interfaceMeasurable- Parameters:
config- The configuration for this metricnow- The POSIX time in milliseconds the measurement is being taken- Returns:
- The measured value
-
-