- 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
MetricsSettingsorConfig(see thecreatemethods), - retrieving the singleton registry factory or updating it according to
MetricsSettingsorConfig(see thegetInstancemethods), 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 Summary
Modifier and TypeMethodDescriptionstatic RegistryFactorycreate()Returns aRegistryFactoryaccording to the default metrics settings.static RegistryFactoryDeprecated.static RegistryFactorycreate(MetricsSettings metricsSettings) Returns aRegistryFactoryaccording to the specifiedMetricsSettings.static RegistryFactoryReturns the singleton instance of theRegistryFactory, either the initial default value or the one resulting from the most recent prior use ofgetInstance(MetricsSettings)orgetInstance(Config).static RegistryFactorygetInstance(Config config) Deprecated.UsegetInstance(MetricsSettings)insteadstatic RegistryFactorygetInstance(ComponentMetricsSettings componentMetricsSettings) Returns aRegistryFactoryaccording to theComponentMetricsSettingsprovided and the underlying overall metrics settings.static RegistryFactorygetInstance(MetricsSettings metricSettings) Returns aRegistryFactoryaccording to theMetricsSettingsprovided and makes the instance the new value of the singleton.Returns aMetricRegistryinstance of the requested type.default voidupdate(MetricsSettings metricsSettings) Updates the metrics settings for theRegistryFactory.
-
Method Details
-
create
Returns aRegistryFactoryaccording to the default metrics settings.- Returns:
- new
RegistryFactory
-
create
Returns aRegistryFactoryaccording to the specifiedMetricsSettings.- Parameters:
metricsSettings- settings for overall metrics- Returns:
- new
RegistryFactory
-
create
Deprecated.Usecreate(MetricsSettings)insteadReturns aRegistryFactoryaccording to the specified overall metricsConfig.Equivalent to
RegistryFactory.create(MetricsSettings.create(config)).- Parameters:
config-Confignode for the overall metrics config section- Returns:
- new
RegistryFactory
-
getInstance
Returns the singleton instance of theRegistryFactory, either the initial default value or the one resulting from the most recent prior use ofgetInstance(MetricsSettings)orgetInstance(Config).- Returns:
RegistryFactory
-
getInstance
Deprecated.UsegetInstance(MetricsSettings)insteadReturns aRegistryFactorycreated according to the specifiedConfig, while also setting the singleton instanceRegistryFactorywhichgetInstance()will return.- Parameters:
config- theConfigto use in setting up theRegistryFactory- Returns:
- the new
RegistryFactorycreated according to the specified config
-
getInstance
Returns aRegistryFactoryaccording to theMetricsSettingsprovided and makes the instance the new value of the singleton.- Parameters:
metricSettings- metrics settings to be used in preparing theRegistryFactory- Returns:
- the new
RegistryFactory
-
getInstance
Returns aRegistryFactoryaccording to theComponentMetricsSettingsprovided and the underlying overall metrics settings.- Parameters:
componentMetricsSettings- metrics settings for the component requesting the registry factory- Returns:
- either the active
RegistryFactoryor a no-op one (if the component's metrics settings indicate)
-
getRegistry
Returns aMetricRegistryinstance of the requested type.- Parameters:
type-MetricRegistry.Typeof the registry to be returned- Returns:
- the
MetricRegistryof the requested type
-
update
Updates the metrics settings for theRegistryFactory.Reserved for use by internal Helidon code.
- Parameters:
metricsSettings- metrics settings to use in updating the factory
-
create(MetricsSettings)instead