|
OpenNMS API 1.2.3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opennms.netmgt.rtc.RTCManager
Maintains calculations for categories.
The RTCManager maintains data required so as to calculate availability for the different categories configured in categories.xml
The RTC initializes its data from the database when it comes up. It then subscribes to the Events subsystem to receive events of interest to keep the data up-to-date
Availability data is sent out to listeners who indicate that they are listening by sending an RTC 'subscribe' event. The subscribe event has an URL and user/passwd info. so RTC can post data to the URL
The RTC has two timers(a low threshold and a high threshold) and a counter that can run upto a configurable max number of events - these are used to determine when availability information is to be sent out when event streams are coming in at normal rates. When no events are received, a timer configured with a user configured time(defaulting to one minute) decides the interval at which data is sent
RTCConstants
,
DataSender
,
DataManager
Nested Class Summary | |
private class |
RTCManager.RTCTimerTask
The timer scheduled task that runs and informs the RTCManager when the timer goes off |
Field Summary | |
private static java.lang.String |
HIGHT_TASK
The id for the high threshold timer task |
private static java.lang.String |
LOG4J_CATEGORY
The log4j category used to log debug messsages and statements. |
private static java.lang.String |
LOWT_TASK
The id for the low threshold timer task |
private int |
m_counter
The counter keeping track of the number of messages |
private static DataManager |
m_dataMgr
manager of the data maintained by the RTC |
private DataSender |
m_dataSender
The DataSender |
private BroadcastEventProcessor |
m_eventReceiver
The events receiver |
private long |
m_highThresholdInterval
The high threshold refresh interval. |
private java.util.TimerTask |
m_highTtask
The high threshold timer task |
private long |
m_lowThresholdInterval
The low threshold refresh interval. |
private java.util.TimerTask |
m_lowTtask
The low threshold timer task |
private static long |
m_rollingWindow
The configurable rolling window read from the properties file |
private static RTCManager |
m_singleton
Singleton instance of this class |
private int |
m_status
The current status of this fiber |
private java.util.Timer |
m_timer
The RTC timer |
private RunnableConsumerThreadPool |
m_updaterPool
The RunnableConsumerThreadPool that runs updaters that interpret and update the data |
private long |
m_userRefreshInterval
The user refresh interval. |
private java.util.TimerTask |
m_userTask
The user refresh timer task |
private int |
MAX_EVENTS_BEFORE_RESEND
The maximum number of events that are received before a resend. |
private static int |
NUM_UPDATERS
The initial number of updater threads |
private static java.lang.String |
USERTIMER
The id for the user refresh timer task |
Fields inherited from interface org.opennms.core.fiber.PausableFiber |
PAUSE_PENDING, PAUSED, RESUME_PENDING |
Fields inherited from interface org.opennms.core.fiber.Fiber |
RUNNING, START_PENDING, STARTING, STATUS_NAMES, STOP_PENDING, STOPPED |
Constructor Summary | |
RTCManager()
The constructor for the RTCManager |
Method Summary | |
void |
checkTimerTasksOnEventReceipt()
Check the timer tasks. |
static java.util.Map |
getCategories()
Gets the categories. |
static DataManager |
getDataManager()
Gets the data manager. |
DataSender |
getDataSender()
Get the data sender. |
static RTCManager |
getInstance()
Gets the instance of the RTCmanager. |
java.lang.String |
getName()
Returns a name/id for this process. |
static long |
getRollingWindow()
Gets the rolling window. |
int |
getStatus()
Returns the current status. |
void |
incrementCounter()
Updates the number of events received. |
void |
init()
|
void |
pause()
Pauses all the threads. |
void |
resetUserTimer()
Reset the user timer. |
void |
resume()
Resumes all the threads. |
void |
start()
Start the RTCManager. |
void |
stop()
Stops all the threads. |
private void |
timerTaskComplete(RTCManager.RTCTimerTask tt)
Handles a completed task. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final java.lang.String LOG4J_CATEGORY
private static final RTCManager m_singleton
private static final java.lang.String LOWT_TASK
private static final java.lang.String HIGHT_TASK
private static final java.lang.String USERTIMER
private static final int NUM_UPDATERS
private static long m_rollingWindow
private java.util.Timer m_timer
private java.util.TimerTask m_lowTtask
private long m_lowThresholdInterval
private java.util.TimerTask m_highTtask
private long m_highThresholdInterval
private java.util.TimerTask m_userTask
private long m_userRefreshInterval
private int m_counter
private int MAX_EVENTS_BEFORE_RESEND
private BroadcastEventProcessor m_eventReceiver
private RunnableConsumerThreadPool m_updaterPool
private DataSender m_dataSender
private static DataManager m_dataMgr
private int m_status
Constructor Detail |
public RTCManager()
Method Detail |
private void timerTaskComplete(RTCManager.RTCTimerTask tt)
If the low threshold or high threshold timers expire, send category data out and set both timer(task)s to null so they can be reset when the next event comes in
If the user refresh timer is the one that expired, send category data out and reset the user timer(task)
tt
- the task that is finishing.public void checkTimerTasksOnEventReceipt()
public void resetUserTimer()
public java.lang.String getName()
getName
in interface Fiber
Fiber
.public int getStatus()
getStatus
in interface Fiber
Fiber
.public void init()
public void start()
start
in interface Fiber
public void pause()
pause
in interface PausableFiber
public void resume()
resume
in interface PausableFiber
public void stop()
stop
in interface Fiber
public void incrementCounter()
public DataSender getDataSender()
public static java.util.Map getCategories()
public static DataManager getDataManager()
public static long getRollingWindow()
public static RTCManager getInstance()
|
OpenNMS API 1.2.3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |