Interface RegistryFactory

All Known Implementing Classes:
RegistryFactory

public interface RegistryFactory
Behavior of a RegistryFactory, capable of providing metrics registries of various types (application, base, vendor) plus static methods for:
  • creating "free-standing" registry factories according to MetricsSettings or Config (see the create methods),
  • retrieving the singleton registry factory or updating it according to MetricsSettings or Config (see the getInstance methods), and
  • retrieving the appropriate registry factory for a metrics-capable component, based on the component's own metrics settings combined with the overall metrics settings and whether full-featured metrics are available on the path (see the getInstance() method).
  • Method Details

    • create

      static RegistryFactory create()
      Returns a RegistryFactory according to the default metrics settings.
      Returns:
      new RegistryFactory
    • create

      static RegistryFactory create(MetricsSettings metricsSettings)
      Returns a RegistryFactory according to the specified MetricsSettings.
      Parameters:
      metricsSettings - settings for overall metrics
      Returns:
      new RegistryFactory
    • create

      @Deprecated static RegistryFactory create(Config config)
      Deprecated.
      Returns a RegistryFactory according to the specified overall metrics Config.

      Equivalent to RegistryFactory.create(MetricsSettings.create(config)).

      Parameters:
      config - Config node for the overall metrics config section
      Returns:
      new RegistryFactory
    • getInstance

      static RegistryFactory getInstance()
      Returns the singleton instance of the RegistryFactory, either the initial default value or the one resulting from the most recent prior use of getInstance(MetricsSettings) or getInstance(Config).
      Returns:
      RegistryFactory
    • getInstance

      @Deprecated static RegistryFactory getInstance(Config config)
      Deprecated.
      Returns a RegistryFactory created according to the specified Config, while also setting the singleton instance RegistryFactory which getInstance() will return.
      Parameters:
      config - the Config to use in setting up the RegistryFactory
      Returns:
      the new RegistryFactory created according to the specified config
    • getInstance

      static RegistryFactory getInstance(MetricsSettings metricSettings)
      Returns a RegistryFactory according to the MetricsSettings provided and makes the instance the new value of the singleton.
      Parameters:
      metricSettings - metrics settings to be used in preparing the RegistryFactory
      Returns:
      the new RegistryFactory
    • getInstance

      static RegistryFactory getInstance(ComponentMetricsSettings componentMetricsSettings)
      Returns a RegistryFactory according to the ComponentMetricsSettings provided and the underlying overall metrics settings.
      Parameters:
      componentMetricsSettings - metrics settings for the component requesting the registry factory
      Returns:
      either the active RegistryFactory or a no-op one (if the component's metrics settings indicate)
    • getRegistry

      Returns a MetricRegistry instance of the requested type.
      Parameters:
      type - MetricRegistry.Type of the registry to be returned
      Returns:
      the MetricRegistry of the requested type
    • update

      default void update(MetricsSettings metricsSettings)
      Updates the metrics settings for the RegistryFactory.

      Reserved for use by internal Helidon code.

      Parameters:
      metricsSettings - metrics settings to use in updating the factory