Interface AbstractRegistry.GaugeFactory.FunctionBased

Enclosing interface:
AbstractRegistry.GaugeFactory
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 static interface AbstractRegistry.GaugeFactory.FunctionBased
Gauge factory based on a function which provides the gauge value when passed an object of a declared type.
  • Method Summary

    Modifier and Type
    Method
    Description
    <T, R extends Number>
    Gauge<R>
    createGauge(Metadata metadata, T object, Function<T,R> valueFunction)
    Creates a gauge implementation with the specified metadata which invokes the provided function passing the given object.
  • Method Details

    • createGauge

      <T, R extends Number> Gauge<R> createGauge(Metadata metadata, T object, Function<T,R> valueFunction)
      Creates a gauge implementation with the specified metadata which invokes the provided function passing the given object.
      Type Parameters:
      T - type of object passed to the function
      R - specific Number subtype the gauge reports
      Parameters:
      metadata - metadata to use in defining the gauge
      object - object to be passed to the function which provides the gauge value
      valueFunction - function which provides the gauge value
      Returns:
      new gauge implementation