boolean result = false;
PagedResources<MetricResource> resources = xdTemplate.counterOperations().list();
Iterator<MetricResource> resourceIter = resources.iterator();
while (resourceIter.hasNext()) {
MetricResource resource = resourceIter.next();
if (name.equals(resource.getName())) {
result = true;
break;
}
}
return result;