public class AlarmSinkCentral extends Object implements Runnable, AlarmSinkCentralMBean
AlarmSinkCentral
represent a central "proxy"
for created AlarmSink
's.
When AlarmSink
's is created ( with the default
constructor ), they are attched to the AlarmSinkCentral
singleton instance which writes alarms directly into the
alarm list on behalf of the attached AlarmSink
instances.
The benefit of using the AlarmSinkCentral
is:
AlarmSink
AlarmSinkCentral
is available
in NCS JVM.
When specifying the queue size the amount alarm will be queued before
it is written to Cdb.
Alarms are written to a blocking queue within the
same JVM as the NCS. The NCS writes the alarms
down into the CDB.Modifier and Type | Method and Description |
---|---|
static ArrayBlockingQueue<Alarm> |
getAlarmQueue()
Returns the alarm queue from the
AlarmSinkCentral |
static AlarmSinkCentral |
getAlarmSink(int alarmQueueLen,
Cdb cdb)
Deprecated.
|
static AlarmSinkCentral |
getAlarmSink(int alarmQueueLen,
Cdb cdb,
int alarmBufSize,
long alarmBufTimeout)
Deprecated.
|
static AlarmSinkCentral |
getAlarmSink(int alarmQueueLen,
Maapi maapi)
Creates and returns the singleton instance of the
AlarmSinkCentral |
static AlarmSinkCentral |
getAlarmSink(int alarmQueueLen,
Maapi maapi,
int alarmBufSize,
long alarmBufTimeout)
Creates and returns the buffered NCS alarm queue.
|
boolean |
isAlive() |
boolean |
requestStop() |
void |
run() |
void |
start() |
void |
stop() |
public static ArrayBlockingQueue<Alarm> getAlarmQueue()
AlarmSinkCentral
@Deprecated public static AlarmSinkCentral getAlarmSink(int alarmQueueLen, Cdb cdb)
AlarmSinkCentral
alarmQueueLen
- the maximum length of the queuecdb
- the Cdb instance used to write alarm infopublic static AlarmSinkCentral getAlarmSink(int alarmQueueLen, Maapi maapi)
AlarmSinkCentral
alarmQueueLen
- the maximum length of the queuemaapi
- the Maapi instance used to write alarm info@Deprecated public static AlarmSinkCentral getAlarmSink(int alarmQueueLen, Cdb cdb, int alarmBufSize, long alarmBufTimeout)
alarmQueueLen
- the maximum length of the queuecdb
- the Cdb instance used to write alarm infoalarmBufSize
- the size of the alarm bufferalarmBufTimeout
- timeout in seconds after which the buffer
will be submitted if there are no new alarms in the queuepublic static AlarmSinkCentral getAlarmSink(int alarmQueueLen, Maapi maapi, int alarmBufSize, long alarmBufTimeout)
alarmQueueLen
- the maximum length of the queuemaapi
- the Maapi instance used to write alarm infoalarmBufSize
- the size of the alarm bufferalarmBufTimeout
- timeout in seconds after which the buffer
will be submitted if there are no new alarms in the queuepublic void start()
start
in interface AlarmSinkCentralMBean
public boolean isAlive()
isAlive
in interface AlarmSinkCentralMBean
public boolean requestStop()
public void stop()
stop
in interface AlarmSinkCentralMBean