Public Member Functions | |
AlarmsContainer (int max) | |
synchronized int | size () |
synchronized void | add (AlarmTableEntry entry) throws AlarmContainerException |
synchronized boolean | contains (String alarmID) |
synchronized AlarmTableEntry | get (int pos) |
synchronized AlarmTableEntry | get (String id) |
synchronized void | clear () |
synchronized AlarmTableEntry | removeOldest () throws AlarmContainerException |
synchronized void | remove (Alarm alarm) throws AlarmContainerException |
synchronized int | removeInactiveAlarms (AlarmGUIType type) throws AlarmContainerException |
synchronized void | replace (Alarm newAlarm) throws AlarmContainerException |
Private Attributes | |
HashMap< String, AlarmTableEntry > | entries = new HashMap<String AlarmTableEntry>() |
final Vector< String > | index = new Vector<String>() |
final int | maxAlarms |
It is composed of 2 collections:
HashMap
stores each entry accessed by its alarmID (the key) Vector
of Strings
used to remember the position of each alarm when the max number of alarms has been reached It also allows to access the alarms by row
|
Build an AlarmContainer
|
|
Add an entry (i.e a alarm) in the collection. If there is no room available in the container, an exception is thrown. Checking if there is enough room must be done by the caller.
Reimplemented in alma::acsplugins::alarmsystem::gui::table::AlarmsReductionContainer.
|
|
Remove all the elements in the container Reimplemented in alma::acsplugins::alarmsystem::gui::table::AlarmsReductionContainer.
|
|
Check if an alarm with the given ID is in the container
|
|
Return the entry with the given ID
|
|
Return the entry in the given position
|
|
Remove the entry for the passed alarm
Reimplemented in alma::acsplugins::alarmsystem::gui::table::AlarmsReductionContainer.
|
|
Remove all the inactive alarms of a given type. If the type is INACTIVE all inactive alarms are deleted regardless of their priority
|
|
Remove the oldest entry in the container
Reimplemented in alma::acsplugins::alarmsystem::gui::table::AlarmsReductionContainer.
|
|
Replace the alarm in a row with passed one. The entry to replace the alarm is given by the alarm ID of the parameter.
Reimplemented in alma::acsplugins::alarmsystem::gui::table::AlarmsReductionContainer.
|
|
Return the number of alarms in the container.
|
|
The entries in the table |
|
The index when the reduction rules are not applied Each item in the vector represents the ID of the entry shown in a table row when the reduction rules are not used. |
|
The maximum number of alarms to store in the container |