Class WindowedCount
- java.lang.Object
-
- org.apache.kafka.common.metrics.stats.SampledStat
-
- org.apache.kafka.common.metrics.stats.WindowedSum
-
- org.apache.kafka.common.metrics.stats.WindowedCount
-
- All Implemented Interfaces:
Measurable
,MeasurableStat
,MetricValueProvider<Double>
,Stat
- Direct Known Subclasses:
Count
public class WindowedCount extends WindowedSum
ASampledStat
that maintains a simple count of what it has seen. This is a special kind ofWindowedSum
that always records a value of1
instead of the provided value. In other words, it counts the number ofSampledStat.record(MetricConfig, double, long)
invocations, instead of summing the recorded values. See alsoCumulativeCount
for a non-sampled version of this metric.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.kafka.common.metrics.stats.SampledStat
SampledStat.Sample
-
-
Field Summary
-
Fields inherited from class org.apache.kafka.common.metrics.stats.SampledStat
samples
-
-
Constructor Summary
Constructors Constructor Description WindowedCount()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
update(SampledStat.Sample sample, MetricConfig config, double value, long now)
-
Methods inherited from class org.apache.kafka.common.metrics.stats.WindowedSum
combine
-
Methods inherited from class org.apache.kafka.common.metrics.stats.SampledStat
current, measure, newSample, oldest, purgeObsoleteSamples, record
-
-
-
-
Method Detail
-
update
protected void update(SampledStat.Sample sample, MetricConfig config, double value, long now)
- Overrides:
update
in classWindowedSum
-
-