final Act act = new Act(new ZKCollector(zk, "jvm", "Jvm metrics.",
jvmPath), new CollectorHandler() {
@Override
public void handle(@SuppressWarnings("rawtypes") Future future) {
try {
MetricsRecord record = (MetricsRecord) future.get();
if (null != record) {
if (LOG.isDebugEnabled()) {
for (@SuppressWarnings("rawtypes")
Metric metric : record.metrics()) {
LOG.debug("Metric name:" + metric.name() + " metric value:"
+ metric.value());
}
}
repository.put(groom, record);