Class TotalMetric

java.lang.Object
com.mongodb.kafka.connect.util.jmx.internal.TotalMetric
All Implemented Interfaces:
Metric

public class TotalMetric extends Object implements Metric
  • Constructor Details

    • TotalMetric

      public TotalMetric(String name)
  • Method Details

    • emit

      public void emit(Consumer<MetricValue> consumer)
      Specified by:
      emit in interface Metric
      Parameters:
      consumer - A callback receiving a MetricValue that may be used to obtain the name and most recent value.
    • sample

      public void sample(long v)
      Description copied from interface: Metric
      Take the measurement.
      Specified by:
      sample in interface Metric
      Parameters:
      v - The value of the measurement.