【发布时间】:2014-10-22 09:47:35
【问题描述】:
我想在服务器运行时查看 Ehcache 的所有统计信息。 在文档中,我找到了诸如“StatisticsGateway”和“SampledCache”之类的对象。我正在使用 ehcache 2.9。
通过使用 StatisticsGateway 获取不完整的统计信息。使用 SampledCache 对象时,我得到更多统计信息,但没有以某种方式描述检索对象。
例如获取StatisticsGateway对象如下:
Cache cache = cacheManager.getCache("name");
StatisticsGateway statistic = cache.getStatistics();
statistic.cacheHitCount() etc.
如何获取 SampledCache 对象?
提前致谢!
【问题讨论】:
标签: caching statistics ehcache