类 RedisMultiMetricRepository
- java.lang.Object
- org.springframework.boot.actuate.metrics.repository.redis.RedisMultiMetricRepository
public class RedisMultiMetricRepository extends Object implements MultiMetricRepository
MultiMetricRepository
implementation backed by a redis store. Metric values are stored as zset values and the timestamps as regular values, both against a key composed of the group name prefixed with a constant prefix (default "spring.groups."). The group names are stored as a zset under "keys." +[prefix]
.
构造器概要
构造器 构造器 说明 RedisMultiMetricRepository(org.springframework.data.redis.connection.RedisConnectionFactory redisConnectionFactory)
RedisMultiMetricRepository(org.springframework.data.redis.connection.RedisConnectionFactory redisConnectionFactory, String prefix)
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 long
countGroups()
The number of groups available in this repository.Iterable<Metric<?>>
findAll(String group)
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.
构造器详细资料
RedisMultiMetricRepository
public RedisMultiMetricRepository(org.springframework.data.redis.connection.RedisConnectionFactory redisConnectionFactory)
RedisMultiMetricRepository
public RedisMultiMetricRepository(org.springframework.data.redis.connection.RedisConnectionFactory redisConnectionFactory, String prefix)
方法详细资料
findAll
public Iterable<Metric<?>> findAll(String group)
从接口复制的说明:PrefixMetricReader
Find all metrics whose name starts with the given prefix.- 指定者:
findAll
在接口中PrefixMetricReader
- 参数:
group
- the prefix for metric names- 返回:
- all metrics with names starting with the prefix
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