Class MultiMetricRichGaugeReader
- java.lang.Object
- org.springframework.boot.actuate.metrics.rich.MultiMetricRichGaugeReader
- All Implemented Interfaces:
RichGaugeReader
public class MultiMetricRichGaugeReader extends Object implements RichGaugeReader
ARichGaugeReader
that works by reading metric values from aMultiMetricRepository
where the group name is the RichGauge name. The format used matches that in the RichGaugeExporter, so this reader can be used on a store that has been populated using that exporter.- Since:
- 1.1.0
Constructor Summary
Constructors Constructor Description MultiMetricRichGaugeReader(MultiMetricRepository repository)
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
count()
Return the number of gauge values available.Iterable<RichGauge>
findAll()
Find all instances of rich gauge known to this reader.RichGauge
findOne(String name)
Find a single instance of a rich gauge by name.
Constructor Detail
MultiMetricRichGaugeReader
public MultiMetricRichGaugeReader(MultiMetricRepository repository)
Method Detail
findOne
public RichGauge findOne(String name)
Description copied from interface:RichGaugeReader
Find a single instance of a rich gauge by name.- Specified by:
findOne
in interfaceRichGaugeReader
- Parameters:
name
- the name of the gauge- Returns:
- a rich gauge value
findAll
public Iterable<RichGauge> findAll()
Description copied from interface:RichGaugeReader
Find all instances of rich gauge known to this reader.- Specified by:
findAll
in interfaceRichGaugeReader
- Returns:
- all instances known to this reader
count
public long count()
Description copied from interface:RichGaugeReader
Return the number of gauge values available.- Specified by:
count
in interfaceRichGaugeReader
- Returns:
- the number of values