-
- All Known Implementing Classes:
RegistryFactory
public interface RegistryFactoryBehavior of aRegistryFactory, 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
All Methods Static Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description static RegistryFactorycreate()Returns aRegistryFactoryaccording to the default metrics settings.static RegistryFactorycreate(Config config)Deprecated.Usecreate(MetricsSettings)insteadstatic RegistryFactorycreate(MetricsSettings metricsSettings)Returns aRegistryFactoryaccording to the specifiedMetricsSettings.static RegistryFactorygetInstance()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).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.MetricRegistrygetRegistry(MetricRegistry.Type type)Returns aMetricRegistryinstance of the requested type.default voidupdate(MetricsSettings metricsSettings)Updates the metrics settings for theRegistryFactory.
-
-
-
Method Detail
-
create
static RegistryFactory create()
Returns aRegistryFactoryaccording to the default metrics settings.- Returns:
- new
RegistryFactory
-
create
static RegistryFactory create(MetricsSettings metricsSettings)
Returns aRegistryFactoryaccording to the specifiedMetricsSettings.- Parameters:
metricsSettings- settings for overall metrics- Returns:
- new
RegistryFactory
-
create
@Deprecated static RegistryFactory create(Config config)
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
static 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 static RegistryFactory getInstance(Config config)
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
static RegistryFactory getInstance(MetricsSettings metricSettings)
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
static RegistryFactory getInstance(ComponentMetricsSettings componentMetricsSettings)
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
MetricRegistry getRegistry(MetricRegistry.Type type)
Returns aMetricRegistryinstance of the requested type.- Parameters:
type-MetricRegistry.Typeof the registry to be returned- Returns:
- the
MetricRegistryof the requested type
-
update
default void update(MetricsSettings metricsSettings)
Updates the metrics settings for theRegistryFactory.Reserved for use by internal Helidon code.
- Parameters:
metricsSettings- metrics settings to use in updating the factory
-
-