-
- All Known Implementing Classes:
RegistryFactory
public interface RegistryFactory
Behavior of aRegistryFactory
, 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
All Methods Static Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description static RegistryFactory
create()
Returns aRegistryFactory
according to the default metrics settings.static RegistryFactory
create(Config config)
Deprecated.Usecreate(MetricsSettings)
insteadstatic RegistryFactory
create(MetricsSettings metricsSettings)
Returns aRegistryFactory
according to the specifiedMetricsSettings
.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)
.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.MetricRegistry
getRegistry(MetricRegistry.Type type)
Returns aMetricRegistry
instance of the requested type.default void
update(MetricsSettings metricsSettings)
Updates the metrics settings for theRegistryFactory
.
-
-
-
Method Detail
-
create
static RegistryFactory create()
Returns aRegistryFactory
according to the default metrics settings.- Returns:
- new
RegistryFactory
-
create
static RegistryFactory create(MetricsSettings metricsSettings)
Returns aRegistryFactory
according to the specifiedMetricsSettings
.- Parameters:
metricsSettings
- settings for overall metrics- Returns:
- new
RegistryFactory
-
create
@Deprecated static RegistryFactory create(Config config)
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
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 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
static RegistryFactory getInstance(MetricsSettings metricSettings)
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
static RegistryFactory getInstance(ComponentMetricsSettings componentMetricsSettings)
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
MetricRegistry getRegistry(MetricRegistry.Type type)
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
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
-
-