@Override protected void doInTransactionWithoutResult(TransactionStatus status) { final List<OnmsAlarm> allAlarms = alarmDao.findAll(); numAlarms.set(allAlarms.size()); // Save the timestamp after the load, so we can differentiate between how long it took // to load the alarms and how long it took to invoke the callbacks systemMillisAfterLoad.set(System.currentTimeMillis()); forEachListener(l -> { LOG.debug("Calling handleAlarmSnapshot on listener: {}", l); l.handleAlarmSnapshot(allAlarms); LOG.debug("Done calling listener."); }); } });
public void onNewOrUpdatedAlarm(OnmsAlarm alarm) { forEachListener(l -> l.handleNewOrUpdatedAlarm(alarm)); }
@Override public void onAlarmDeleted(OnmsAlarm alarm) { forEachListener(l -> l.handleDeletedAlarm(alarm.getId(), alarm.getReductionKey())); }
@Override public void onAlarmDeleted(OnmsAlarm alarm) { forEachListener(l -> l.handleDeletedAlarm(alarm.getId(), alarm.getReductionKey())); }
@Override protected void doInTransactionWithoutResult(TransactionStatus status) { final List<OnmsAlarm> allAlarms = alarmDao.findAll(); numAlarms.set(allAlarms.size()); // Save the timestamp after the load, so we can differentiate between how long it took // to load the alarms and how long it took to invoke the callbacks systemMillisAfterLoad.set(System.currentTimeMillis()); forEachListener(l -> { LOG.debug("Calling handleAlarmSnapshot on listener: {}", l); l.handleAlarmSnapshot(allAlarms); LOG.debug("Done calling listener."); }); } });
public void onNewOrUpdatedAlarm(OnmsAlarm alarm) { forEachListener(l -> l.handleNewOrUpdatedAlarm(alarm)); }