4.6. 查询统计
Data Grid 通过搜索入口点公开索引和查询统计信息,您可以按照以下方式使用:
// Statistics for the local cluster member SearchStatistics statistics = Search.getSearchStatistics(cache); // Consolidated statistics for the whole cluster CompletionStage<SearchStatisticsSnapshot> statistics = Search.getClusteredSearchStatistics(cache)
通过 REST 的统计信息
Data Grid Server 还通过 REST 端点公开索引和查询统计信息。
使用以下调用: GET /v2/caches/{cacheName}/search/stats