|
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.datablock.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
Field Summary | |
private java.util.List |
m_categories
List of the categories this node belongs to |
private java.lang.String |
m_ip
The ip address of the interface of the node. |
private long |
m_nodeID
The node ID. |
private java.lang.String |
m_svcName
The service name. |
private RTCNodeSvcTimesList |
m_svcTimesList
List of the lost/regained service times for this node. |
Constructor Summary | |
RTCNode()
Default constructor. |
|
RTCNode(long nodeid,
java.lang.String ip,
java.lang.String svcName)
Constructor. |
Method Summary | |
void |
addCategory(java.lang.String catLabel)
Add to the category list for this node. |
void |
addSvcTime(long losttime)
Add a new 'RTCNodeSvcTime' entry for this node. |
void |
addSvcTime(long losttime,
long regainedtime)
Add a new 'RTCNodeSvcTime' entry for this node. |
boolean |
belongsTo(java.lang.String catLabel)
Check if this node belongs to the category. |
boolean |
equals(java.lang.Object o)
Compare RTCNodes. |
java.util.List |
getCategories()
Return the list of categories this node belongs to. |
long |
getDownTime(java.lang.String cat,
long curTime,
long rollingWindow)
Get the down time. |
java.lang.String |
getIP()
Return the IP address. |
long |
getNodeID()
Return the node ID. |
java.util.List |
getServiceTimes()
Return the list of service times for this node. |
java.lang.String |
getSvcName()
Return the service name. |
double |
getValue(java.lang.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(java.lang.String catLabel)
Remove a category from the node's context. |
void |
setIP(java.lang.String ipStr)
Set the IP address. |
void |
setNodeID(long id)
Set the node ID. |
void |
setSvcName(java.lang.String svcName)
Set the service name. |
java.lang.String |
toString()
String represenatation. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
private long m_nodeID
private java.lang.String m_ip
private java.lang.String m_svcName
private RTCNodeSvcTimesList m_svcTimesList
private java.util.List m_categories
Constructor Detail |
public RTCNode()
public RTCNode(long nodeid, java.lang.String ip, java.lang.String svcName)
nodeid
- the node idip
- the IP addresssvcName
- the serviceMethod Detail |
public void setNodeID(long id)
id
- the node IDpublic void setSvcName(java.lang.String svcName)
svcName
- the service namepublic void setIP(java.lang.String ipStr)
ipStr
- the ip addresspublic void addSvcTime(long losttime, long regainedtime)
losttime
- time at which service was lostregainedtime
- time at which service was regainedpublic void addSvcTime(long losttime)
losttime
- time at which service was lostpublic void addCategory(java.lang.String catLabel)
catLabel
- category label of the category this node has been added topublic void removeCategory(java.lang.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 java.lang.String getSvcName()
public java.lang.String getIP()
public java.util.List getServiceTimes()
public boolean belongsTo(java.lang.String catLabel)
catLabel
- category label
public java.util.List getCategories()
public long getDownTime(java.lang.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(java.lang.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(java.lang.Object o)
public java.lang.String toString()
|
OpenNMS API 1.2.3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |