Class CompositeMetricReader
- java.lang.Object
- org.springframework.boot.actuate.metrics.reader.CompositeMetricReader
- All Implemented Interfaces:
MetricReader
public class CompositeMetricReader extends Object implements MetricReader
Composite implementation ofMetricReader
.
Constructor Summary
Constructors Constructor Description CompositeMetricReader(MetricReader... readers)
Method Summary
All Methods Instance Methods Concrete 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).
Constructor Detail
CompositeMetricReader
public CompositeMetricReader(MetricReader... readers)
Method Detail
findOne
public Metric<?> findOne(String metricName)
Description copied from interface:MetricReader
Find an instance of the metric with the given name (usually the latest recorded value).- Specified by:
findOne
in interfaceMetricReader
- Parameters:
metricName
- the name of the metric to find- Returns:
- a metric value or null if there are none with that name
findAll
public Iterable<Metric<?>> findAll()
Description copied from interface:MetricReader
Find all the metrics known to this reader.- Specified by:
findAll
in interfaceMetricReader
- Returns:
- all instances of metrics known to this reader
count
public long count()
Description copied from interface:MetricReader
The number of metrics known to this reader.- Specified by:
count
in interfaceMetricReader
- Returns:
- the number of metrics