public class RedisMultiMetricRepository extends Object implements MultiMetricRepository
MultiMetricRepository implementation backed by a redis store. Metric values are
stored as regular values 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
[prefix] + "keys".| Constructor and Description |
|---|
RedisMultiMetricRepository(org.springframework.data.redis.connection.RedisConnectionFactory redisConnectionFactory) |
| Modifier and Type | Method and Description |
|---|---|
long |
count() |
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 |
reset(String group)
Rest the values of all metrics in the group.
|
void |
save(String group,
Collection<Metric<?>> values)
Save some metric values and associate them with a group name.
|
void |
setPrefix(String prefix)
The prefix for all metrics keys.
|
public RedisMultiMetricRepository(org.springframework.data.redis.connection.RedisConnectionFactory redisConnectionFactory)
public void setPrefix(String prefix)
prefix - the prefix to set for all metrics keyspublic Iterable<Metric<?>> findAll(String metricNamePrefix)
PrefixMetricReaderfindAll in interface PrefixMetricReadermetricNamePrefix - the prefix for metric namespublic void save(String group, Collection<Metric<?>> values)
MultiMetricRepositorysave in interface MultiMetricRepositorygroup - the name of the groupvalues - the metric values to savepublic Iterable<String> groups()
MultiMetricRepositorygroups in interface MultiMetricRepositorypublic long count()
count in interface MultiMetricRepositorypublic void reset(String group)
MultiMetricRepositoryreset in interface MultiMetricRepositorygroup - reset the whole groupCopyright © 2014 Pivotal Software, Inc.. All rights reserved.