public final class RTCManager extends AbstractServiceDaemon
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
PAUSE_PENDING, PAUSED, RESUME_PENDING
RUNNING, START_PENDING, STARTING, STATUS_NAMES, STOP_PENDING, STOPPED
Constructor and Description |
---|
RTCManager()
The constructor for the RTCManager
|
Modifier and Type | Method and Description |
---|---|
void |
checkTimerTasksOnEventReceipt()
Check the timer tasks.
|
static Map<String,RTCCategory> |
getCategories()
Gets the categories.
|
static DataManager |
getDataManager()
Gets the data manager.
|
org.opennms.netmgt.rtc.DataSender |
getDataSender()
Get the data sender.
|
static RTCManager |
getInstance()
Gets the instance of the RTCmanager.
|
static long |
getRollingWindow()
Gets the rolling window.
|
void |
incrementCounter()
Updates the number of events received.
|
protected void |
onInit()
onInit
|
protected void |
onStart()
onStart
|
protected void |
onStop()
onStop
|
void |
resetUserTimer()
Reset the user timer.
|
static void |
setDataManager(DataManager dataMgr)
Sets the data manager.
|
afterPropertiesSet, destroy, getName, getStatus, getStatusText, init, isPaused, isRunning, isStarting, onPause, onResume, pause, resume, setStatus, start, status, stop, waitForStatus, waitForStatus
public void checkTimerTasksOnEventReceipt()
public void resetUserTimer()
protected void onInit()
onInit
onInit
in class AbstractServiceDaemon
protected void onStart()
onStart
onStart
in class AbstractServiceDaemon
protected void onStop()
onStop
onStop
in class AbstractServiceDaemon
public void incrementCounter()
public org.opennms.netmgt.rtc.DataSender getDataSender()
public static Map<String,RTCCategory> getCategories()
public static DataManager getDataManager()
public static void setDataManager(DataManager dataMgr)
dataMgr
- a DataManager
object.public static long getRollingWindow()
public static RTCManager getInstance()
Copyright © 2015. All rights reserved.