Module io.helidon.metrics.api
Package io.helidon.metrics.api
Interface MeterRegistry.Builder<B extends MeterRegistry.Builder<B,R>,R extends MeterRegistry>
- Type Parameters:
B
- builder typeR
- meter registry type
- Enclosing interface:
MeterRegistry
public static interface MeterRegistry.Builder<B extends MeterRegistry.Builder<B,R>,R extends MeterRegistry>
extends Builder<B,R>
Builder for creating a new meter registry.
-
Method Summary
Modifier and TypeMethodDescriptionAssigns the clock to be used within the meter registry (e.g., in timers), defaulting to a system clock.metricsConfig
(MetricsConfig metricsConfig) Sets theMetricsConfig
for the meter registry, defaulting to the metrics config with which theMetricsFactory
was created.onMeterAdded
(Consumer<Meter> addListener) Records a subscriber to meter-added events.onMeterRemoved
(Consumer<Meter> removeListener) Records a subscriber to meter-removed events.
-
Method Details
-
clock
Assigns the clock to be used within the meter registry (e.g., in timers), defaulting to a system clock.- Parameters:
clock
- theClock
to be used- Returns:
- updated builder
-
metricsConfig
Sets theMetricsConfig
for the meter registry, defaulting to the metrics config with which theMetricsFactory
was created.- Parameters:
metricsConfig
- metrics config to control the meter registry- Returns:
- updated builder
-
onMeterAdded
Records a subscriber to meter-added events.- Parameters:
addListener
- listener for meter-added events- Returns:
- updated builder
-
onMeterRemoved
Records a subscriber to meter-removed events.- Parameters:
removeListener
- listener for meter-removal events- Returns:
- updated builder
-