|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.opennms.netmgt.rtc.datablock.RTCNode
public class RTCNode
The main unit for the RTCManager.
RTCNode is the main data unit for the RTCManager - these datablocks are created initially as data is read from the database and later if a 'nodeGainedService' is received - each node maintains its node id, ip address, service name and a list of 'RTCNodeSvcTime's
Also, each node knows and maintains a list of categories that this tuple belongs to
RTCNodeSvcTime,
RTCNodeSvcTimesList| Constructor Summary | |
|---|---|
RTCNode()
Default constructor. |
|
RTCNode(long nodeid,
String ip,
String svcName)
Constructor. |
|
RTCNode(RTCNodeKey key)
|
|
| Method Summary | |
|---|---|
void |
addCategory(String catLabel)
Add to the category list for this node. |
void |
addSvcTime(long losttime,
long regainedtime)
Add a new 'RTCNodeSvcTime' entry for this node. |
boolean |
belongsTo(String catLabel)
Check if this node belongs to the category. |
boolean |
equals(Object o)
Compare RTCNodes. |
List |
getCategories()
Return the list of categories this node belongs to. |
long |
getDownTime(String cat,
long curTime,
long rollingWindow)
Get the down time. |
String |
getIP()
Return the IP address. |
long |
getNodeID()
Return the node ID. |
List |
getServiceTimes()
Return the list of service times for this node. |
String |
getSvcName()
Return the service name. |
double |
getValue(String cat,
long curTime,
long rollingWindow)
Get the avaialability. |
boolean |
isServiceCurrentlyDown()
Return if the service is currently up/down. |
void |
nodeLostService(long t)
Add a node lost service time. |
void |
nodeRegainedService(long t)
Add a node regained service time. |
void |
removeCategory(String catLabel)
Remove a category from the node's context. |
void |
setIP(String ipStr)
Set the IP address. |
void |
setNodeID(long id)
Set the node ID. |
void |
setSvcName(String svcName)
Set the service name. |
String |
toString()
String represenatation. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public RTCNode()
public RTCNode(RTCNodeKey key)
public RTCNode(long nodeid,
String ip,
String svcName)
nodeid - the node idip - the IP addresssvcName - the service| Method Detail |
|---|
public void setNodeID(long id)
id - the node IDpublic void setSvcName(String svcName)
svcName - the service namepublic void setIP(String ipStr)
ipStr - the ip address
public void addSvcTime(long losttime,
long regainedtime)
losttime - time at which service was lostregainedtime - time at which service was regainedpublic void addCategory(String catLabel)
catLabel - category label of the category this node has been added topublic void removeCategory(String catLabel)
catLabel - category label of the category this node has been added topublic void nodeLostService(long t)
t - the time at which service was lostpublic void nodeRegainedService(long t)
t - the time at which node regained servicepublic long getNodeID()
public String getSvcName()
public String getIP()
public List getServiceTimes()
public boolean belongsTo(String catLabel)
catLabel - category label
public List getCategories()
public long getDownTime(String cat,
long curTime,
long rollingWindow)
cat - the category in the context which of which downtime is neededcurTime - the start time (or current time) from which we go back
rollinWindow intervalrollingWindow - the window for which downtime is required
public double getValue(String cat,
long curTime,
long rollingWindow)
cat - the category in the context which of which availability is
neededcurTime - the start time (or current time) from which we go back
rollinWindow intervalrollingWindow - the window for which availability is required
public boolean isServiceCurrentlyDown()
public boolean equals(Object o)
equals in class Objectpublic String toString()
toString in class Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||