|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.opennms.netmgt.rtc.DataManager
public class DataManager
Contains and maintains all the data for the RTC. The basic datablock is a 'RTCNode' that gets added to relevant 'RTCCategory's. it also gets added to a map with different keys for easy lookup The map('RTCHashMap') is keyed with 'RTCNodeKey's(a nodeid/ip/svc combination), nodeid/ip combinations and nodeid and these keys either lookup a single RTCNode or lists of 'RTCNode's Incoming events have a method in the DataManager to alter data - for e.g., a 'nodeGainedService' event would result in the 'nodeGainedService()' method being called by the DataUpdater(s).
| Constructor Summary | |
|---|---|
DataManager()
Constructor. |
|
| Method Summary | |
|---|---|
void |
assetInfoChanged(long nodeid)
|
Map<String,RTCCategory> |
getCategories()
|
int |
getServiceCount(long nodeid,
String catLabel)
Get the service count for the nodeid in the context of the passed category |
int |
getServiceDownCount(long nodeid,
String catLabel)
Get the service down count for the nodeid in the context of the passed category |
double |
getValue(long nodeid,
String catLabel,
long curTime,
long rollingWindow)
Get the value(uptime) for the nodeid in the last 'rollingWindow' starting at current time in the context of the passed category |
double |
getValue(String catLabel,
long curTime,
long rollingWindow)
Get the value(uptime) for the category in the last 'rollingWindow' starting at current time |
void |
interfaceDown(long nodeid,
String ip,
long t)
Add a lost service entry to the right nodes. |
void |
interfaceReparented(String ip,
long oldNodeId,
long newNodeId)
Reparent an interface. |
void |
interfaceUp(long nodeid,
String ip,
long t)
Add a regained service entry to the right nodes. |
void |
nodeCategoryMembershipChanged(long nodeid)
|
void |
nodeDown(long nodeid,
long t)
Add a lost service entry to the right nodes. |
void |
nodeGainedService(long nodeid,
String ip,
String svcName)
Handles a node gained service event. |
void |
nodeLostService(long nodeid,
String ip,
String svcName,
long t)
Handles a node lost service event. |
void |
nodeRegainedService(long nodeid,
String ip,
String svcName,
long t)
Add a regained service entry to the right node. |
void |
nodeUp(long nodeid,
long t)
Add a regained service entry to the right nodes. |
void |
rtcNodeRescan(long nodeid)
Update the categories for a node. |
void |
serviceDeleted(long nodeid,
String ip,
String svcName)
Remove node from the map and the categories on a 'serviceDeleted' event. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DataManager()
throws SAXException,
IOException,
SQLException,
FilterParseException,
RTCException
SQLException - if there is an error reading initial data from the
database
FilterParseException - if a rule in the categories.xml was incorrect
RTCException - if the initialization/data reading does not go through
SAXException
IOException| Method Detail |
|---|
public void nodeGainedService(long nodeid,
String ip,
String svcName)
nodeid - the node idip - the IP addresssvcName - the service name
public void nodeLostService(long nodeid,
String ip,
String svcName,
long t)
nodeid - the node idip - the IP addresssvcName - the service namet - the time at which service was lost
public void interfaceDown(long nodeid,
String ip,
long t)
nodeid - the node idip - the IP addresst - the time at which service was lost
public void nodeDown(long nodeid,
long t)
nodeid - the node idt - the time at which service was lost
public void nodeUp(long nodeid,
long t)
nodeid - the node idt - the time at which service was regained
public void interfaceUp(long nodeid,
String ip,
long t)
nodeid - the node idip - the IP addresst - the time at which service was regained
public void nodeRegainedService(long nodeid,
String ip,
String svcName,
long t)
nodeid - the node idip - the IP addresssvcName - the service namet - the time at which service was regained
public void serviceDeleted(long nodeid,
String ip,
String svcName)
nodeid - the nodeid on which service was deletedip - the ip on which service was deletedsvcName - the service that was deletedpublic void assetInfoChanged(long nodeid)
public void nodeCategoryMembershipChanged(long nodeid)
public void rtcNodeRescan(long nodeid)
throws SQLException,
FilterParseException,
RTCException
nodeid - the nodeid on which SNMP service was added
SQLException - if the database read fails due to an SQL error
FilterParseException - if filtering the data against the category rule fails due to
the rule being incorrect
RTCException - if the database read or filtering the data against the
category rule fails for some reason
public void interfaceReparented(String ip,
long oldNodeId,
long newNodeId)
ip - the interface to reparentoldNodeId - the node that the ip belonged to earliernewNodeId - the node that the ip now belongs to
public double getValue(String catLabel,
long curTime,
long rollingWindow)
catLabel - the category to which the node should belong tocurTime - the current timerollingWindow - the window for which value is to be calculated
public double getValue(long nodeid,
String catLabel,
long curTime,
long rollingWindow)
nodeid - the node for which value is to be calculatedcatLabel - the category to which the node should belong tocurTime - the current timerollingWindow - the window for which value is to be calculated
public int getServiceCount(long nodeid,
String catLabel)
nodeid - the node for which service count is to be calculatedcatLabel - the category to which the node should belong to
public int getServiceDownCount(long nodeid,
String catLabel)
nodeid - the node for which service down count is to be calculatedcatLabel - the category to which the node should belong to
public Map<String,RTCCategory> getCategories()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||