Package io.helidon.metrics
Class Registry
- java.lang.Object
-
- org.eclipse.microprofile.metrics.MetricRegistry
-
- io.helidon.metrics.Registry
-
- All Implemented Interfaces:
InternalBridge.MetricRegistry
public class Registry extends MetricRegistry implements InternalBridge.MetricRegistry
Metrics registry.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.eclipse.microprofile.metrics.MetricRegistry
MetricRegistry.Type
-
Nested classes/interfaces inherited from interface io.helidon.common.metrics.InternalBridge.MetricRegistry
InternalBridge.MetricRegistry.RegistryFactory
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedRegistry(MetricRegistry.Type type)Create a registry of a certain type.
-
Method Summary
-
Methods inherited from class org.eclipse.microprofile.metrics.MetricRegistry
name, name
-
-
-
-
Constructor Detail
-
Registry
protected Registry(MetricRegistry.Type type)
Create a registry of a certain type.- Parameters:
type- Registry type.
-
-
Method Detail
-
create
public static Registry create(MetricRegistry.Type type)
Create a registry of a certain type.- Parameters:
type- Registry type.- Returns:
- The newly created registry.
-
register
public <T extends Metric> T register(String name, T metric) throws IllegalArgumentException
- Specified by:
registerin classMetricRegistry- Throws:
IllegalArgumentException
-
register
public <T extends Metric> T register(Metadata metadata, T metric) throws IllegalArgumentException
- Specified by:
registerin classMetricRegistry- Throws:
IllegalArgumentException
-
register
public <T extends Metric> T register(Metadata metadata, T metric, Tag... tags) throws IllegalArgumentException
- Specified by:
registerin classMetricRegistry- Throws:
IllegalArgumentException
-
counter
public Counter counter(String name)
- Specified by:
counterin interfaceInternalBridge.MetricRegistry- Specified by:
counterin classMetricRegistry
-
counter
public Counter counter(Metadata metadata)
- Specified by:
counterin classMetricRegistry
-
counter
public Counter counter(InternalBridge.Metadata metadata)
- Specified by:
counterin interfaceInternalBridge.MetricRegistry
-
counter
public Counter counter(InternalBridge.Metadata metadata, Map<String,String> tags)
- Specified by:
counterin interfaceInternalBridge.MetricRegistry
-
counter
public Counter counter(String name, Tag... tags)
- Specified by:
counterin classMetricRegistry
-
counter
public Counter counter(Metadata metadata, Tag... tags)
- Specified by:
counterin classMetricRegistry
-
histogram
public Histogram histogram(String name)
- Specified by:
histogramin interfaceInternalBridge.MetricRegistry- Specified by:
histogramin classMetricRegistry
-
histogram
public Histogram histogram(Metadata metadata)
- Specified by:
histogramin classMetricRegistry
-
histogram
public Histogram histogram(InternalBridge.Metadata metadata)
- Specified by:
histogramin interfaceInternalBridge.MetricRegistry
-
histogram
public Histogram histogram(InternalBridge.Metadata metadata, Map<String,String> tags)
- Specified by:
histogramin interfaceInternalBridge.MetricRegistry
-
histogram
public Histogram histogram(String name, Tag... tags)
- Specified by:
histogramin classMetricRegistry
-
histogram
public Histogram histogram(Metadata metadata, Tag... tags)
- Specified by:
histogramin classMetricRegistry
-
meter
public Meter meter(String name)
- Specified by:
meterin interfaceInternalBridge.MetricRegistry- Specified by:
meterin classMetricRegistry
-
meter
public Meter meter(Metadata metadata)
- Specified by:
meterin classMetricRegistry
-
meter
public Meter meter(InternalBridge.Metadata metadata)
- Specified by:
meterin interfaceInternalBridge.MetricRegistry
-
meter
public Meter meter(InternalBridge.Metadata metadata, Map<String,String> tags)
- Specified by:
meterin interfaceInternalBridge.MetricRegistry
-
meter
public Meter meter(String name, Tag... tags)
- Specified by:
meterin classMetricRegistry
-
meter
public Meter meter(Metadata metadata, Tag... tags)
- Specified by:
meterin classMetricRegistry
-
timer
public Timer timer(String name)
- Specified by:
timerin interfaceInternalBridge.MetricRegistry- Specified by:
timerin classMetricRegistry
-
timer
public Timer timer(Metadata metadata)
- Specified by:
timerin classMetricRegistry
-
timer
public Timer timer(InternalBridge.Metadata metadata)
- Specified by:
timerin interfaceInternalBridge.MetricRegistry
-
timer
public Timer timer(InternalBridge.Metadata metadata, Map<String,String> tags)
- Specified by:
timerin interfaceInternalBridge.MetricRegistry
-
timer
public Timer timer(String name, Tag... tags)
- Specified by:
timerin classMetricRegistry
-
timer
public Timer timer(Metadata metadata, Tag... tags)
- Specified by:
timerin classMetricRegistry
-
concurrentGauge
public ConcurrentGauge concurrentGauge(String name)
- Specified by:
concurrentGaugein classMetricRegistry
-
concurrentGauge
public ConcurrentGauge concurrentGauge(Metadata metadata)
- Specified by:
concurrentGaugein classMetricRegistry
-
concurrentGauge
public ConcurrentGauge concurrentGauge(String name, Tag... tags)
- Specified by:
concurrentGaugein classMetricRegistry
-
concurrentGauge
public ConcurrentGauge concurrentGauge(Metadata metadata, Tag... tags)
- Specified by:
concurrentGaugein classMetricRegistry
-
remove
public boolean remove(String name)
- Specified by:
removein interfaceInternalBridge.MetricRegistry- Specified by:
removein classMetricRegistry
-
remove
public boolean remove(MetricID metricID)
- Specified by:
removein classMetricRegistry
-
removeMatching
public void removeMatching(MetricFilter filter)
- Specified by:
removeMatchingin classMetricRegistry
-
getNames
public SortedSet<String> getNames()
- Specified by:
getNamesin interfaceInternalBridge.MetricRegistry- Specified by:
getNamesin classMetricRegistry
-
getMetricIDs
public SortedSet<MetricID> getMetricIDs()
- Specified by:
getMetricIDsin classMetricRegistry
-
getGauges
public SortedMap<MetricID,Gauge> getGauges()
- Specified by:
getGaugesin classMetricRegistry
-
getGauges
public SortedMap<MetricID,Gauge> getGauges(MetricFilter filter)
- Specified by:
getGaugesin classMetricRegistry
-
getCounters
public SortedMap<MetricID,Counter> getCounters()
- Specified by:
getCountersin classMetricRegistry
-
getCounters
public SortedMap<MetricID,Counter> getCounters(MetricFilter filter)
- Specified by:
getCountersin classMetricRegistry
-
getHistograms
public SortedMap<MetricID,Histogram> getHistograms()
- Specified by:
getHistogramsin classMetricRegistry
-
getHistograms
public SortedMap<MetricID,Histogram> getHistograms(MetricFilter filter)
- Specified by:
getHistogramsin classMetricRegistry
-
getMeters
public SortedMap<MetricID,Meter> getMeters()
- Specified by:
getMetersin classMetricRegistry
-
getMeters
public SortedMap<MetricID,Meter> getMeters(MetricFilter filter)
- Specified by:
getMetersin classMetricRegistry
-
getTimers
public SortedMap<MetricID,Timer> getTimers()
- Specified by:
getTimersin classMetricRegistry
-
getTimers
public SortedMap<MetricID,Timer> getTimers(MetricFilter filter)
- Specified by:
getTimersin classMetricRegistry
-
getConcurrentGauges
public SortedMap<MetricID,ConcurrentGauge> getConcurrentGauges()
- Specified by:
getConcurrentGaugesin classMetricRegistry
-
getConcurrentGauges
public SortedMap<MetricID,ConcurrentGauge> getConcurrentGauges(MetricFilter filter)
- Specified by:
getConcurrentGaugesin classMetricRegistry
-
getMetadata
public Map<String,Metadata> getMetadata()
- Specified by:
getMetadatain classMetricRegistry
-
getMetrics
public Map<MetricID,Metric> getMetrics()
- Specified by:
getMetricsin classMetricRegistry
-
getBridgeMetrics
public Map<InternalBridge.MetricID,Metric> getBridgeMetrics(Predicate<? super Map.Entry<? extends InternalBridge.MetricID,? extends Metric>> predicate)
- Specified by:
getBridgeMetricsin interfaceInternalBridge.MetricRegistry
-
getBridgeMetrics
public Map<InternalBridge.MetricID,Metric> getBridgeMetrics()
- Specified by:
getBridgeMetricsin interfaceInternalBridge.MetricRegistry
-
getBridgeGauges
public SortedMap<InternalBridge.MetricID,Gauge> getBridgeGauges()
- Specified by:
getBridgeGaugesin interfaceInternalBridge.MetricRegistry
-
getBridgeCounters
public SortedMap<InternalBridge.MetricID,Counter> getBridgeCounters()
- Specified by:
getBridgeCountersin interfaceInternalBridge.MetricRegistry
-
getBridgeHistograms
public SortedMap<InternalBridge.MetricID,Histogram> getBridgeHistograms()
- Specified by:
getBridgeHistogramsin interfaceInternalBridge.MetricRegistry
-
getBridgeMeters
public SortedMap<InternalBridge.MetricID,Meter> getBridgeMeters()
- Specified by:
getBridgeMetersin interfaceInternalBridge.MetricRegistry
-
getBridgeTimers
public SortedMap<InternalBridge.MetricID,Timer> getBridgeTimers()
- Specified by:
getBridgeTimersin interfaceInternalBridge.MetricRegistry
-
register
public <T extends Metric> T register(InternalBridge.Metadata metadata, T metric) throws IllegalArgumentException
- Specified by:
registerin interfaceInternalBridge.MetricRegistry- Throws:
IllegalArgumentException
-
register
public <T extends Metric> T register(InternalBridge.MetricID metricID, T metric) throws IllegalArgumentException
- Specified by:
registerin interfaceInternalBridge.MetricRegistry- Throws:
IllegalArgumentException
-
getMetric
public Optional<Metric> getMetric(String metricName)
Access a metric by name. Used by FT library.- Parameters:
metricName- Metric name.- Returns:
- Optional metric.
-
getBridgeMetric
public Optional<Map.Entry<? extends InternalBridge.MetricID,? extends Metric>> getBridgeMetric(String metricName)
- Specified by:
getBridgeMetricin interfaceInternalBridge.MetricRegistry
-
type
public String type()
Returns type of this registry.- Returns:
- The type.
-
empty
public boolean empty()
Determines if registry is empty.- Returns:
- Outcome of test.
-
-