Interface MeterRegistry.Builder<B extends MeterRegistry.Builder<B,R>,R extends MeterRegistry>

Type Parameters:
B - builder type
R - meter registry type
All Superinterfaces:
Builder<B,R>, Supplier<R>
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 Details

    • clock

      B clock(Clock clock)
      Assigns the clock to be used within the meter registry (e.g., in timers), defaulting to a system clock.
      Parameters:
      clock - the Clock to be used
      Returns:
      updated builder
    • metricsConfig

      B metricsConfig(MetricsConfig metricsConfig)
      Sets the MetricsConfig for the meter registry, defaulting to the metrics config with which the MetricsFactory was created.
      Parameters:
      metricsConfig - metrics config to control the meter registry
      Returns:
      updated builder
    • onMeterAdded

      B onMeterAdded(Consumer<Meter> addListener)
      Records a subscriber to meter-added events.
      Parameters:
      addListener - listener for meter-added events
      Returns:
      updated builder
    • onMeterRemoved

      B onMeterRemoved(Consumer<Meter> removeListener)
      Records a subscriber to meter-removed events.
      Parameters:
      removeListener - listener for meter-removal events
      Returns:
      updated builder