- 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
orConfig
(see thecreate
methods), - retrieving the singleton registry factory or updating it according to
MetricsSettings
orConfig
(see thegetInstance
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 Summary
Modifier and TypeMethodDescriptionstatic RegistryFactory
create()
Returns aRegistryFactory
according to the default metrics settings.static RegistryFactory
Deprecated.static RegistryFactory
create
(MetricsSettings metricsSettings) Returns aRegistryFactory
according to the specifiedMetricsSettings
.static RegistryFactory
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 RegistryFactory
getInstance
(Config config) Deprecated.UsegetInstance(MetricsSettings)
insteadstatic RegistryFactory
getInstance
(ComponentMetricsSettings componentMetricsSettings) Returns aRegistryFactory
according to theComponentMetricsSettings
provided and the underlying overall metrics settings.static RegistryFactory
getInstance
(MetricsSettings metricSettings) Returns aRegistryFactory
according to theMetricsSettings
provided and makes the instance the new value of the singleton.Returns aMetricRegistry
instance of the requested type.default void
update
(MetricsSettings metricsSettings) Updates the metrics settings for theRegistryFactory
.
-
Method Details
-
create
Returns aRegistryFactory
according to the default metrics settings.- Returns:
- new
RegistryFactory
-
create
Returns aRegistryFactory
according to the specifiedMetricsSettings
.- Parameters:
metricsSettings
- settings for overall metrics- Returns:
- new
RegistryFactory
-
create
Deprecated.Usecreate(MetricsSettings)
insteadReturns aRegistryFactory
according to the specified overall metricsConfig
.Equivalent to
RegistryFactory.create(MetricsSettings.create(config))
.- Parameters:
config
-Config
node 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 aRegistryFactory
created according to the specifiedConfig
, while also setting the singleton instanceRegistryFactory
whichgetInstance()
will return.- Parameters:
config
- theConfig
to use in setting up theRegistryFactory
- Returns:
- the new
RegistryFactory
created according to the specified config
-
getInstance
Returns aRegistryFactory
according to theMetricsSettings
provided 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 aRegistryFactory
according to theComponentMetricsSettings
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 aMetricRegistry
instance of the requested type.- Parameters:
type
-MetricRegistry.Type
of the registry to be returned- Returns:
- the
MetricRegistry
of 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