public static void addTimerForPdxTypeMetrics(final ClientCache clientCache) {
Region temp = clientCache.getRegion("PdxTypes");
if (temp == null) {
temp = clientCache.createClientRegionFactory(ClientRegionShortcut.PROXY).create("PdxTypes");
}
final Region pdxRegions = temp;
metricRegistry.register(MetricRegistry.name("PdxTypes", "count"),
(Gauge<Integer>) () -> pdxRegions.keySetOnServer().size());
ConsoleReporter reporter = ConsoleReporter.forRegistry(metricRegistry)
.convertRatesTo(TimeUnit.SECONDS)
.convertDurationsTo(TimeUnit.MILLISECONDS)
.build();
reporter.start(1, TimeUnit.MINUTES);
}
ToolBox.java 文件源码
java
阅读 32
收藏 0
点赞 0
评论 0
项目:gemfire-copy
作者:
评论列表
文章目录