CacheContainerMetric metric = CacheContainerMetric.forName(name);
if (metric == null) {
context.getFailureDescription().set(InfinispanLogger.ROOT_LOGGER.unknownMetric(name));
} else {
CacheContainer container = ServiceContainerHelper.findValue(context.getServiceRegistry(false), EmbeddedCacheManagerService.getServiceName(containerName));
if (container != null) {
ModelNode result = metric.getValue(container);
context.getResult().set((result != null) && result.isDefined() ? result : new ModelNode("N/A"));
}
}