use of org.infinispan.query.impl.InfinispanQueryStatisticsInfo in project infinispan by infinispan.
the class SearchAdminResource method indexStats.
private CompletionStage<RestResponse> indexStats(RestRequest request) {
NettyRestResponse.Builder responseBuilder = new NettyRestResponse.Builder();
InfinispanQueryStatisticsInfo searchStats = lookupQueryStatistics(request, responseBuilder);
if (searchStats == null)
return completedFuture(responseBuilder.build());
return searchStats.computeLegacyIndexStatistics().thenApply(json -> asJsonResponse(json, responseBuilder));
}
use of org.infinispan.query.impl.InfinispanQueryStatisticsInfo in project infinispan by infinispan.
the class SearchAdminResource method queryStats.
private CompletionStage<RestResponse> queryStats(RestRequest request) {
NettyRestResponse.Builder responseBuilder = new NettyRestResponse.Builder();
InfinispanQueryStatisticsInfo searchStats = lookupQueryStatistics(request, responseBuilder);
if (searchStats == null)
return completedFuture(responseBuilder.build());
return asJsonResponseFuture(searchStats.getLegacyQueryStatistics(), responseBuilder);
}
use of org.infinispan.query.impl.InfinispanQueryStatisticsInfo in project infinispan by infinispan.
the class SearchAdminResource method clearStats.
private CompletionStage<RestResponse> clearStats(RestRequest request) {
NettyRestResponse.Builder responseBuilder = new NettyRestResponse.Builder();
InfinispanQueryStatisticsInfo queryStatistics = lookupQueryStatistics(request, responseBuilder);
if (queryStatistics == null)
return completedFuture(responseBuilder.build());
responseBuilder.status(NO_CONTENT);
queryStatistics.clear();
return completedFuture(responseBuilder.build());
}
Aggregations