第 15 章 配置 Data Grid Server Statistics
启用数据网格导出到 指标端点
或通过 JMX MBeans 导出的统计信息。注册 JMX MBeans 也公开了您可以远程执行的管理操作。
15.1. 启用 Data Grid Statistics 复制链接链接已复制到粘贴板!
复制链接链接已复制到粘贴板!
配置 Data Grid 以导出缓存管理器和缓存的统计信息。
默认情况下,Data Grid Server 启用缓存管理器统计信息。您必须明确启用缓存的统计信息。
流程
修改您的配置,以以下方法之一启用 Data Grid 统计:
-
declarative: 添加
statistics="true"
属性。 -
programmatic :调用
.statistics ()
方法。
声明
<!-- Enables statistics for the Cache Manager. --> <cache-container statistics="true"> <!-- Enables statistics for the named cache. --> <local-cache name="mycache" statistics="true"/> </cache-container>
<!-- Enables statistics for the Cache Manager. -->
<cache-container statistics="true">
<!-- Enables statistics for the named cache. -->
<local-cache name="mycache" statistics="true"/>
</cache-container>
programmatic