Package org.opennms.netmgt.alarmd.api
Class AlarmCallbackStateTracker
- java.lang.Object
-
- org.opennms.netmgt.alarmd.api.AlarmCallbackStateTracker
-
public class AlarmCallbackStateTracker extends java.lang.Object
This class can be used to help track callbacks issued via theAlarmLifecycleListener
in order to help simplify possible synchronization logic inAlarmLifecycleListener.handleAlarmSnapshot(List)
.- Author:
- jwhite
-
-
Constructor Summary
Constructors Constructor Description AlarmCallbackStateTracker()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Set<java.lang.Integer>
getUpdatedAlarmIds()
void
resetStateAndStopTrackingAlarms()
void
startTrackingAlarms()
void
trackDeletedAlarm(int alarmId, java.lang.String reductionKey)
void
trackNewOrUpdatedAlarm(int alarmId, java.lang.String reductionKey)
boolean
wasAlarmWithIdDeleted(int alarmId)
boolean
wasAlarmWithIdUpdated(int alarmId)
boolean
wasAlarmWithReductionKeyDeleted(java.lang.String reductionKey)
boolean
wasAlarmWithReductionKeyUpdated(java.lang.String reductionKey)
-
-
-
Method Detail
-
startTrackingAlarms
public void startTrackingAlarms()
-
trackNewOrUpdatedAlarm
public void trackNewOrUpdatedAlarm(int alarmId, java.lang.String reductionKey)
-
trackDeletedAlarm
public void trackDeletedAlarm(int alarmId, java.lang.String reductionKey)
-
resetStateAndStopTrackingAlarms
public void resetStateAndStopTrackingAlarms()
-
wasAlarmWithIdUpdated
public boolean wasAlarmWithIdUpdated(int alarmId)
-
wasAlarmWithIdDeleted
public boolean wasAlarmWithIdDeleted(int alarmId)
-
wasAlarmWithReductionKeyUpdated
public boolean wasAlarmWithReductionKeyUpdated(java.lang.String reductionKey)
-
wasAlarmWithReductionKeyDeleted
public boolean wasAlarmWithReductionKeyDeleted(java.lang.String reductionKey)
-
getUpdatedAlarmIds
public java.util.Set<java.lang.Integer> getUpdatedAlarmIds()
-
-