use of com.creditease.monitor.captureframework.spi.MonitorRepository in project uavstack by uavorg.
the class StandardMonitor method doPreStore.
@Override
public void doPreStore() {
MonitorRepository cmr = getRepository();
MonitorElement[] elems = cmr.getElements();
for (MonitorElement elem : elems) {
MonitorElemCapHandler caphandler = selectHandler(elem.getCapClass());
if (caphandler == null)
continue;
MonitorElementInstance[] instances = elem.getInstances();
for (MonitorElementInstance instance : instances) {
try {
caphandler.preStore(instance);
} catch (Exception e) {
log.error("captureHandler[" + caphandler.getClass().getName() + "] execution [preStore] fails ", e);
// ignore
}
}
}
}
Aggregations