Interface MetricValueProvider<T>

All Known Subinterfaces:
Gauge<T>, Measurable, MeasurableStat
All Known Implementing Classes:
Avg, CumulativeCount, CumulativeSum, ExponentialWeightedAvg, Frequencies, Max, Min, MinTokenBucket, Percentiles, Rate, SampledStat, SimpleRate, TokenBucket, Value, WindowedCount, WindowedSum
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface MetricValueProvider<T>
Super-interface for Measurable or Gauge that provides metric values.
  • Method Summary

    Modifier and Type
    Method
    Description
    value(MetricConfig config, long now)
    Returns the current value associated with this metric.
  • Method Details

    • value

      T value(MetricConfig config, long now)
      Returns the current value associated with this metric.
      Parameters:
      config - The configuration for this metric
      now - The POSIX time in milliseconds the measurement is being taken
      Returns:
      the current metric value