org.apache.kafka.common.metrics.stats
Class Total

java.lang.Object
  extended by org.apache.kafka.common.metrics.stats.Total
All Implemented Interfaces:
Measurable, MeasurableStat, Stat

public class Total
extends java.lang.Object
implements MeasurableStat

An un-windowed cumulative total maintained over all time.


Constructor Summary
Total()
           
Total(double value)
           
 
Method Summary
 double measure(MetricConfig config, long now)
          Measure this quantity and return the result as a double
 void record(MetricConfig config, double value, long now)
          Record the given value
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Total

public Total()

Total

public Total(double value)
Method Detail

record

public void record(MetricConfig config,
                   double value,
                   long now)
Description copied from interface: Stat
Record the given value

Specified by:
record in interface Stat
Parameters:
config - The configuration to use for this metric
value - The value to record
now - The POSIX time in milliseconds this value occurred

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 interface Measurable
Parameters:
config - The configuration for this metric
now - The POSIX time in milliseconds the measurement is being taken
Returns:
The measured value