public static interface MetricsFactory.MetricBuilder
| Modifier and Type | Method and Description |
|---|---|
void |
buildCounter(Supplier<Number> countFunction)
Register a counter that retrieves its value from a supplier function
|
<T,R extends Number> |
buildCounter(T obj,
Function<T,R> countFunction)
Register a counter that retrieves its value by the applying a function
to an object
|
void |
buildGauge(Supplier<Number> gaugeFunction)
Register a gauge that retrieves its value from a supplier function
|
<T,R extends Number> |
buildGauge(T obj,
Function<T,R> gaugeFunction)
Register a gauge that retrieves its value by applying a function
to an object
|
MetricsFactory.TimeRecorder |
buildTimer() |
<T> Callable<T> |
buildTimer(Callable<T> f)
Wrap a
Callable so that it is timed when invoked. |
Runnable |
buildTimer(Runnable f)
Wrap a
Runnable so that it is timed when invoked. |
<T> Supplier<T> |
buildTimer(Supplier<T> f)
Wrap a
Supplier so that it is timed when invoked. |
MetricsFactory.MetricBuilder |
description(String description) |
MetricsFactory.MetricBuilder |
tag(String key,
String value) |
MetricsFactory.MetricBuilder |
unit(String unit)
Specify the metric unit (optional)
|
MetricsFactory.MetricBuilder description(String description)
description - Description text of the eventual metric (optional).MetricsFactory.MetricBuilder tag(String key, String value)
key - The tag key.value - The tag value.MetricsFactory.MetricBuilder unit(String unit)
unit - Base unit of the eventual metricvoid buildCounter(Supplier<Number> countFunction)
countFunction - Function supplying a monotonically increasing number value<T,R extends Number> void buildCounter(T obj, Function<T,R> countFunction)
obj - Object instance to observecountFunction - Function returning a monotonically increasing valuevoid buildGauge(Supplier<Number> gaugeFunction)
gaugeFunction - Function supplying number value<T,R extends Number> void buildGauge(T obj, Function<T,R> gaugeFunction)
obj - Object instance to observegaugeFunction - Function returning a number valueMetricsFactory.TimeRecorder buildTimer()
Runnable buildTimer(Runnable f)
Runnable so that it is timed when invoked.f - The Runnable to time when it is invoked.<T> Callable<T> buildTimer(Callable<T> f)
Callable so that it is timed when invoked.T - The return type of the callable.f - The Callable to time when it is invoked.Copyright © 2020 JBoss by Red Hat. All rights reserved.