Interface FunctionCounter

All Superinterfaces:
Meter
All Known Implementing Classes:
DropwizardTypes.DescribableFunctionCounter

public interface FunctionCounter extends Meter
A counter that tracks a monotonically increasing function.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static final class 
    Fluent builder for function counters.

    Nested classes/interfaces inherited from interface org.forgerock.monitoring.api.instrument.Meter

    Meter.Id, Meter.Type
  • Method Summary

    Modifier and Type
    Method
    Description
    builder(String name, T obj, ToDoubleFunction<T> f)
    Return the Builder object for this FunctionCounter.
    double
    Returns the cumulative count since this function counter was created.
    Get a set of measurements.

    Methods inherited from interface org.forgerock.monitoring.api.instrument.Meter

    getId
  • Method Details

    • builder

      static <T> FunctionCounter.Builder<T> builder(String name, T obj, ToDoubleFunction<T> f)
      Return the Builder object for this FunctionCounter.
      Type Parameters:
      T - The type of the object to monitor
      Parameters:
      name - of the FunctionCounter
      obj - The object to monitor
      f - The function to apply to the object to monitor
      Returns:
      the Builder for a FunctionCounter
    • count

      double count()
      Returns the cumulative count since this function counter was created.
      Returns:
      the cumulative count since this function counter was created
    • measure

      default Iterable<Measurement> measure()
      Description copied from interface: Meter
      Get a set of measurements. Should always return the same number of measurements and in the same order, regardless of the level of activity or the lack thereof.
      Specified by:
      measure in interface Meter
      Returns:
      The set of measurements that represents the instantaneous value of this meter.