Module io.helidon.metrics.api
Package io.helidon.metrics.api
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.
Gauge factory based on a function which provides the gauge value when passed an object of a declared type.
-
Method Summary
Modifier and TypeMethodDescriptioncreateGauge
(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 functionR
- specificNumber
subtype the gauge reports- Parameters:
metadata
- metadata to use in defining the gaugeobject
- object to be passed to the function which provides the gauge valuevalueFunction
- function which provides the gauge value- Returns:
- new gauge implementation
-