Interface MetricReader
- All Known Subinterfaces:
MetricRepository
- All Known Implementing Classes:
AggregateMetricReader
,BufferMetricReader
,CompositeMetricReader
,InMemoryMetricRepository
,MetricRegistryMetricReader
,MetricsEndpointMetricReader
,RedisMetricRepository
,SpringIntegrationMetricReader
public interface MetricReader
A simple reader interface used to interrogateMetric
s.
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description long
count()
The number of metrics known to this reader.Iterable<Metric<?>>
findAll()
Find all the metrics known to this reader.Metric<?>
findOne(String metricName)
Find an instance of the metric with the given name (usually the latest recorded value).
Method Detail
findOne
Metric<?> findOne(String metricName)
Find an instance of the metric with the given name (usually the latest recorded value).- Parameters:
metricName
- the name of the metric to find- Returns:
- a metric value or null if there are none with that name
findAll
Iterable<Metric<?>> findAll()
Find all the metrics known to this reader.- Returns:
- all instances of metrics known to this reader
count
long count()
The number of metrics known to this reader.- Returns:
- the number of metrics