类 InMemoryMultiMetricRepository
- java.lang.Object
- org.springframework.boot.actuate.metrics.repository.InMemoryMultiMetricRepository
public class InMemoryMultiMetricRepository extends Object implements MultiMetricRepository
MultiMetricRepository
implementation backed by aInMemoryMetricRepository
.- 从以下版本开始:
- 1.5.0
构造器概要
构造器 构造器 说明 InMemoryMultiMetricRepository()
Create a newInMemoryMetricRepository
backed by a newInMemoryMetricRepository
.InMemoryMultiMetricRepository(InMemoryMetricRepository repository)
Create a newInMemoryMetricRepository
backed by the specifiedInMemoryMetricRepository
.
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 long
countGroups()
The number of groups available in this repository.Iterable<Metric<?>>
findAll(String metricNamePrefix)
Find all metrics whose name starts with the given prefix.Iterable<String>
groups()
The names of all the groups known to this repository.void
increment(String group, Delta<?> delta)
Increment the value of a metric (or decrement if the delta is negative).void
reset(String group)
Rest the values of all metrics in the group.void
set(String group, Collection<Metric<?>> values)
Save some metric values and associate them with a group name.
构造器详细资料
InMemoryMultiMetricRepository
public InMemoryMultiMetricRepository()
Create a newInMemoryMetricRepository
backed by a newInMemoryMetricRepository
.
InMemoryMultiMetricRepository
public InMemoryMultiMetricRepository(InMemoryMetricRepository repository)
Create a newInMemoryMetricRepository
backed by the specifiedInMemoryMetricRepository
.- 参数:
repository
- the backing repository
方法详细资料
set
public void set(String group, Collection<Metric<?>> values)
从接口复制的说明:PrefixMetricWriter
Save some metric values and associate them with a group name.- 指定者:
set
在接口中PrefixMetricWriter
- 参数:
group
- the name of the groupvalues
- the metric values to save
increment
public void increment(String group, Delta<?> delta)
从接口复制的说明:PrefixMetricWriter
Increment the value of a metric (or decrement if the delta is negative). The name of the metric to increment isgroup + "." + delta.name
.- 指定者:
increment
在接口中PrefixMetricWriter
- 参数:
group
- the name of the groupdelta
- the amount to increment by
groups
public Iterable<String> groups()
从接口复制的说明:MultiMetricRepository
The names of all the groups known to this repository.- 指定者:
groups
在接口中MultiMetricRepository
- 返回:
- all available group names
countGroups
public long countGroups()
从接口复制的说明:MultiMetricRepository
The number of groups available in this repository.- 指定者:
countGroups
在接口中MultiMetricRepository
- 返回:
- the number of groups
reset
public void reset(String group)
从接口复制的说明:PrefixMetricWriter
Rest the values of all metrics in the group. Implementations may choose to discard the old values.- 指定者:
reset
在接口中PrefixMetricWriter
- 参数:
group
- reset the whole group
findAll
public Iterable<Metric<?>> findAll(String metricNamePrefix)
从接口复制的说明:PrefixMetricReader
Find all metrics whose name starts with the given prefix.- 指定者:
findAll
在接口中PrefixMetricReader
- 参数:
metricNamePrefix
- the prefix for metric names- 返回:
- all metrics with names starting with the prefix