public class AlarmMessageProcessorImpl
extends java.lang.Object
The AlarmMessageProcessorImpl checks the timestamp of the alarms it receives from the NC
and publishes a core alarm (LaserCoreFaultState.LaserCoreFaultCodes.ALARMS_TOO_OLD)
if the delay between the actual time and the timestamp exceeds the threshold (delayThreashold).
The check is done in this class because this is the place where alarms from sources are checked.
To ensure that the alarm is set/cleared even if the alarms server does not process alarms,
the check is done by the thread in createTimerTask().
This feature is tested in the alarmTest module.
| Modifier and Type | Field and Description |
|---|---|
static long |
alarmTimestampsCheckInterval
The timestamp of alarms is checked every
alarmTimestamsCheckInterval
to reduce the risk to fill the alarm system publishing this alarm too often. |
static long |
delayThreashold
If the timestamp of alarms and the actual time differ of more then
delayThreashold then a core alarm is issued. |
| Constructor and Description |
|---|
AlarmMessageProcessorImpl(LaserComponent component,
java.util.logging.Logger logger,
StatsCalculator statsCalculator)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
notifyReductionRelatives(Alarm alarm) |
void |
process(Message alarmMessage) |
void |
processChange(FaultState faultState,
java.lang.String sourceName,
java.lang.String sourceHostname,
java.sql.Timestamp sourceTimestamp) |
void |
setAlarmCache(ACSAlarmCacheImpl alarmCache) |
void |
setSourceDAO(SourceDAO sourceDAO) |
void |
start()
Start the periodic task
|
void |
stop()
Stop the periodic task
|
void |
updateMultiplicityNode(Alarm alarm) |
void |
updateReductionStatus(Alarm alarm) |
public static final long delayThreashold
delayThreashold then a core alarm is issued.public static final long alarmTimestampsCheckInterval
alarmTimestamsCheckInterval
to reduce the risk to fill the alarm system publishing this alarm too often.public AlarmMessageProcessorImpl(LaserComponent component, java.util.logging.Logger logger, StatsCalculator statsCalculator)
component - The LaserComponentpublic void setSourceDAO(SourceDAO sourceDAO)
public void setAlarmCache(ACSAlarmCacheImpl alarmCache)
public void notifyReductionRelatives(Alarm alarm)
public void process(Message alarmMessage)
throws java.lang.Exception
java.lang.Exceptionpublic void processChange(FaultState faultState, java.lang.String sourceName, java.lang.String sourceHostname, java.sql.Timestamp sourceTimestamp) throws java.lang.Exception
java.lang.Exceptionpublic void updateMultiplicityNode(Alarm alarm)
public void updateReductionStatus(Alarm alarm)
public void start()
public void stop()