|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.lang.Thread
org.openoss.opennms.spring.qosd.OpenNMSEventHandlerThread
public class OpenNMSEventHandlerThread
This class provides a thread to decouple the OpenNMS event handling from updates to the Node list and the Alarm List in the ossDao. If OpenNMS issues multiple events to the QoSD event handler which cause it to want to update the alarm list or update the node list, this Thread latches the event and will request the ossDao to update it's cache and send any new alarms. If further events occur while the ossDao is updating, these will be latched until the process completes. This prevents every new opennms alarm causing a call to the ossDao while it is running which would otherwise back up a queue of requests against it's synchronized methods.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.lang.Thread |
|---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
| Field Summary |
|---|
| Fields inherited from class java.lang.Thread |
|---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Constructor Summary | |
|---|---|
OpenNMSEventHandlerThread()
|
|
| Method Summary | |
|---|---|
void |
init()
Initialise the Thread. |
void |
kill()
Stop execution of the thread. |
void |
run()
Run method loops until kill() called. |
void |
sendAlarmList()
If called, this method will request that the ossDao Alarm Cache is updated from the OpenNMS database and sent to the QoSD for processing. |
void |
setossDao(OssDaoOpenNMSImpl _ossDao)
provides an interface to OpenNMS which provides a unified api |
void |
updateNodeCache()
If called, this method will request that the ossDao Node Cache is updated from the OpenNMS database and sent to the QoSD for processing. |
| Methods inherited from class java.lang.Thread |
|---|
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public OpenNMSEventHandlerThread()
| Method Detail |
|---|
public void setossDao(OssDaoOpenNMSImpl _ossDao)
ossDao - the ossDao to set
public void run()
throws java.lang.IllegalStateException
run in interface java.lang.Runnablerun in class java.lang.Threadjava.lang.IllegalStateExceptionpublic void init()
public void kill()
public void sendAlarmList()
public void updateNodeCache()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||