- 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 protectedRegistry(MetricRegistry.Type type, RegistrySettings registrySettings)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Registrycreate(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 booleanisMetricEnabled(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 RegistrySettingsregistrySettings()protected Stream<Map.Entry<MetricID,io.helidon.metrics.HelidonMetric>>stream()Returns a stream ofMap.Entryfor 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.voidupdate(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:
isMetricEnabledin classAbstractRegistry<io.helidon.metrics.HelidonMetric>
-
toImpl
protected <T extends Metric> io.helidon.metrics.HelidonMetric toImpl(Metadata metadata, T metric)
Description copied from class:AbstractRegistryCreates a new instance of an implementation wrapper around the indicated metric.- Specified by:
toImplin classAbstractRegistry<io.helidon.metrics.HelidonMetric>- Type Parameters:
T- specific type ofMetricprovided and wrapped- Parameters:
metadata-Metadatafor 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:
registrySettingsin classAbstractRegistry<io.helidon.metrics.HelidonMetric>
-
prepareMetricToTypeMap
protected Map<Class<? extends io.helidon.metrics.HelidonMetric>,MetricType> prepareMetricToTypeMap()
- Specified by:
prepareMetricToTypeMapin classAbstractRegistry<io.helidon.metrics.HelidonMetric>
-
prepareMetricFactories
protected Map<MetricType,BiFunction<String,Metadata,io.helidon.metrics.HelidonMetric>> prepareMetricFactories()
- Specified by:
prepareMetricFactoriesin classAbstractRegistry<io.helidon.metrics.HelidonMetric>
-
getOptionalMetricEntry
protected Optional<Map.Entry<MetricID,io.helidon.metrics.HelidonMetric>> getOptionalMetricEntry(String metricName)
- Overrides:
getOptionalMetricEntryin classAbstractRegistry<io.helidon.metrics.HelidonMetric>
-
metricFactories
protected Map<MetricType,BiFunction<String,Metadata,io.helidon.metrics.HelidonMetric>> metricFactories()
- Overrides:
metricFactoriesin classAbstractRegistry<io.helidon.metrics.HelidonMetric>
-
stream
protected Stream<Map.Entry<MetricID,io.helidon.metrics.HelidonMetric>> stream()
Description copied from class:AbstractRegistryReturns a stream ofMap.Entryfor this registry for enabled metrics.- Overrides:
streamin classAbstractRegistry<io.helidon.metrics.HelidonMetric>- Returns:
- Stream of
Map.Entry
-
metricIDsForName
protected List<MetricID> metricIDsForName(String metricName)
- Overrides:
metricIDsForNamein classAbstractRegistry<io.helidon.metrics.HelidonMetric>
-
getMetricsByName
protected List<Map.Entry<MetricID,io.helidon.metrics.HelidonMetric>> getMetricsByName(String metricName)
- Overrides:
getMetricsByNamein classAbstractRegistry<io.helidon.metrics.HelidonMetric>
-
-