Class BufferMetricReader
- java.lang.Object
- org.springframework.boot.actuate.metrics.buffer.BufferMetricReader
- All Implemented Interfaces:
MetricReader
,PrefixMetricReader
@UsesJava8 public class BufferMetricReader extends Object implements MetricReader, PrefixMetricReader
- Since:
- 1.3.0
Constructor Summary
Constructors Constructor Description BufferMetricReader(CounterBuffers counterBuffers, GaugeBuffers gaugeBuffers)
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.Iterable<Metric<?>>
findAll(String prefix)
Find all metrics whose name starts with the given prefix.Metric<?>
findOne(String name)
Find an instance of the metric with the given name (usually the latest recorded value).
Constructor Detail
BufferMetricReader
public BufferMetricReader(CounterBuffers counterBuffers, GaugeBuffers gaugeBuffers)
Method Detail
findOne
public Metric<?> findOne(String name)
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:
name
- 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
findAll
public Iterable<Metric<?>> findAll(String prefix)
Description copied from interface:PrefixMetricReader
Find all metrics whose name starts with the given prefix.- Specified by:
findAll
in interfacePrefixMetricReader
- Parameters:
prefix
- the prefix for metric names- Returns:
- all metrics with names starting with the prefix
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