类 InMemoryRichGaugeRepository
- java.lang.Object
- org.springframework.boot.actuate.metrics.rich.InMemoryRichGaugeRepository
public class InMemoryRichGaugeRepository extends Object implements RichGaugeRepository
In memory implementation ofMetricWriter
andRichGaugeReader
. When youset
orincrement
a metric value it is used to update aRichGauge
. Gauge values can then be read out using the reader operations.
构造器概要
构造器 构造器 说明 InMemoryRichGaugeRepository()
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 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 metricName)
Find a single instance of a rich gauge by name.void
increment(Delta<?> delta)
Increment the value of a metric (or decrement if the delta is negative).void
reset(String metricName)
Reset the value of a metric, usually to zero value.void
set(Metric<?> metric)
Set the value of a metric.
构造器详细资料
InMemoryRichGaugeRepository
public InMemoryRichGaugeRepository()
方法详细资料
increment
public void increment(Delta<?> delta)
从接口复制的说明:CounterWriter
Increment the value of a metric (or decrement if the delta is negative). The name of the delta is the name of the metric to increment.- 指定者:
increment
在接口中CounterWriter
- 参数:
delta
- the amount to increment by
set
public void set(Metric<?> metric)
从接口复制的说明:GaugeWriter
Set the value of a metric.- 指定者:
set
在接口中GaugeWriter
- 参数:
metric
- the value
reset
public void reset(String metricName)
从接口复制的说明:CounterWriter
Reset the value of a metric, usually to zero value. Implementations can discard the old values if desired, but may choose not to. This operation is optional (some implementations may not be able to fulfill the contract, in which case they should simply do nothing).- 指定者:
reset
在接口中CounterWriter
- 参数:
metricName
- the name to reset
findOne
public RichGauge findOne(String metricName)
从接口复制的说明:RichGaugeReader
Find a single instance of a rich gauge by name.- 指定者:
findOne
在接口中RichGaugeReader
- 参数:
metricName
- the name of the gauge- 返回:
- a rich gauge value
findAll
public Iterable<RichGauge> findAll()
从接口复制的说明:RichGaugeReader
Find all instances of rich gauge known to this reader.- 指定者:
findAll
在接口中RichGaugeReader
- 返回:
- all instances known to this reader
count
public long count()
从接口复制的说明:RichGaugeReader
Return the number of gauge values available.- 指定者:
count
在接口中RichGaugeReader
- 返回:
- the number of values