- java.lang.Object
-
- org.eclipse.microprofile.metrics.MetricRegistry
-
- io.helidon.metrics.api.AbstractRegistry<io.helidon.metrics.HelidonMetric>
-
- io.helidon.metrics.Registry
-
public class Registry extends AbstractRegistry<io.helidon.metrics.HelidonMetric>
Metrics registry.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.eclipse.microprofile.metrics.MetricRegistry
MetricRegistry.Type
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
Registry(MetricRegistry.Type type, RegistrySettings registrySettings)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Registry
create(MetricRegistry.Type type, RegistrySettings registrySettings)
Create a registry of a certain type.protected List<Map.Entry<MetricID,io.helidon.metrics.HelidonMetric>>
getMetricsByName(String metricName)
protected Optional<Map.Entry<MetricID,io.helidon.metrics.HelidonMetric>>
getOptionalMetricEntry(String metricName)
protected boolean
isMetricEnabled(String metricName)
protected Map<MetricType,BiFunction<String,Metadata,io.helidon.metrics.HelidonMetric>>
metricFactories()
protected List<MetricID>
metricIDsForName(String metricName)
protected Map<MetricType,BiFunction<String,Metadata,io.helidon.metrics.HelidonMetric>>
prepareMetricFactories()
protected Map<Class<? extends io.helidon.metrics.HelidonMetric>,MetricType>
prepareMetricToTypeMap()
protected RegistrySettings
registrySettings()
protected Stream<Map.Entry<MetricID,io.helidon.metrics.HelidonMetric>>
stream()
Returns a stream ofMap.Entry
for this registry for enabled metrics.protected <T extends Metric>
io.helidon.metrics.HelidonMetrictoImpl(Metadata metadata, T metric)
Creates a new instance of an implementation wrapper around the indicated metric.void
update(RegistrySettings registrySettings)
Update the registry settings for this registry.-
Methods inherited from class io.helidon.metrics.api.AbstractRegistry
concurrentGauge, concurrentGauge, concurrentGauge, concurrentGauge, counter, counter, counter, counter, deriveType, empty, getConcurrentGauges, getConcurrentGauges, getCounters, getCounters, getGauges, getGauges, getHistograms, getHistograms, getMetadata, getMeters, getMeters, getMetric, getMetric, getMetricIDs, getMetrics, getNames, getOptionalMetricWithIDsEntry, getSimpleTimers, getSimpleTimers, getTimers, getTimers, histogram, histogram, histogram, histogram, isMarkedAsDeleted, isStrictExemplars, meter, meter, meter, meter, register, register, register, registryType, remove, remove, removeMatching, simpleTimer, simpleTimer, simpleTimer, simpleTimer, timer, timer, timer, timer, toString, type
-
Methods inherited from class org.eclipse.microprofile.metrics.MetricRegistry
name, name
-
-
-
-
Constructor Detail
-
Registry
protected Registry(MetricRegistry.Type type, RegistrySettings registrySettings)
-
-
Method Detail
-
create
public static Registry create(MetricRegistry.Type type, RegistrySettings registrySettings)
Create a registry of a certain type.- Parameters:
type
- Registry type.registrySettings
- Registry settings to use in creating the registry.- Returns:
- The newly created registry.
-
update
public void update(RegistrySettings registrySettings)
Update the registry settings for this registry.- Parameters:
registrySettings
- new settings to use going forward
-
isMetricEnabled
protected boolean isMetricEnabled(String metricName)
- Specified by:
isMetricEnabled
in classAbstractRegistry<io.helidon.metrics.HelidonMetric>
-
toImpl
protected <T extends Metric> io.helidon.metrics.HelidonMetric toImpl(Metadata metadata, T metric)
Description copied from class:AbstractRegistry
Creates a new instance of an implementation wrapper around the indicated metric.- Specified by:
toImpl
in classAbstractRegistry<io.helidon.metrics.HelidonMetric>
- Type Parameters:
T
- specific type ofMetric
provided and wrapped- Parameters:
metadata
-Metadata
for the metricmetric
- the existing metric to be wrapped by the impl- Returns:
- new wrapper implementation around the specified metric instance
-
registrySettings
protected RegistrySettings registrySettings()
- Overrides:
registrySettings
in classAbstractRegistry<io.helidon.metrics.HelidonMetric>
-
prepareMetricToTypeMap
protected Map<Class<? extends io.helidon.metrics.HelidonMetric>,MetricType> prepareMetricToTypeMap()
- Specified by:
prepareMetricToTypeMap
in classAbstractRegistry<io.helidon.metrics.HelidonMetric>
-
prepareMetricFactories
protected Map<MetricType,BiFunction<String,Metadata,io.helidon.metrics.HelidonMetric>> prepareMetricFactories()
- Specified by:
prepareMetricFactories
in classAbstractRegistry<io.helidon.metrics.HelidonMetric>
-
getOptionalMetricEntry
protected Optional<Map.Entry<MetricID,io.helidon.metrics.HelidonMetric>> getOptionalMetricEntry(String metricName)
- Overrides:
getOptionalMetricEntry
in classAbstractRegistry<io.helidon.metrics.HelidonMetric>
-
metricFactories
protected Map<MetricType,BiFunction<String,Metadata,io.helidon.metrics.HelidonMetric>> metricFactories()
- Overrides:
metricFactories
in classAbstractRegistry<io.helidon.metrics.HelidonMetric>
-
stream
protected Stream<Map.Entry<MetricID,io.helidon.metrics.HelidonMetric>> stream()
Description copied from class:AbstractRegistry
Returns a stream ofMap.Entry
for this registry for enabled metrics.- Overrides:
stream
in classAbstractRegistry<io.helidon.metrics.HelidonMetric>
- Returns:
- Stream of
Map.Entry
-
metricIDsForName
protected List<MetricID> metricIDsForName(String metricName)
- Overrides:
metricIDsForName
in classAbstractRegistry<io.helidon.metrics.HelidonMetric>
-
getMetricsByName
protected List<Map.Entry<MetricID,io.helidon.metrics.HelidonMetric>> getMetricsByName(String metricName)
- Overrides:
getMetricsByName
in classAbstractRegistry<io.helidon.metrics.HelidonMetric>
-
-