try{
for (Entry<String, T> entry : metrics.entrySet()) {
name = entry.getKey();
MetricCallback callback = callbacks.get(entry.getValue());
if (callback != null)
callback.callback(entry.getValue());
}
} catch (Exception e) {
logger.error("Error when excuting the callbacks defined by user. CallBack Name=" + name, e);
}
}