use of com.ctrip.xpipe.redis.core.meta.ClusterShardCounter in project x-pipe by ctripcorp.
the class MetaUpdate method getStats.
@RequestMapping(value = "/stats", method = RequestMethod.GET)
public Map<String, Integer> getStats() {
XpipeMeta xpipeMeta = metaCache.getXpipeMeta();
ClusterShardCounter counter = new ClusterShardCounter();
xpipeMeta.accept(counter);
HashMap<String, Integer> counts = new HashMap<>();
counts.put("clusterCount", counter.getClusterCount());
counts.put("shardCount", counter.getShardCount());
return counts;
}
Aggregations