|
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.report.datablock.StandardNamedObject
org.opennms.report.datablock.Node
This class holds the interface whaich has service information and list of outages for the service.
Nested Class Summary | |
private static class |
Node.InterfaceComparator
|
Field Summary | |
private static java.lang.String |
LOG4J_CATEGORY
The log4j category used to log debug messsages and statements. |
(package private) long |
m_busDownTime
Total Business Outage |
(package private) long |
m_busTotalWindow
Total Window Time during business hours. |
(package private) long |
m_downTime
Total Outage |
private boolean |
m_hasOutage
Flag indicating an Outage |
private java.util.ArrayList |
m_interfaces
List of outages. |
(package private) int |
m_nodeid
Node identifier. |
(package private) double |
m_percentAvail
Percentage availability. |
(package private) double |
m_percentBusAvail
Percentage availability during business hours. |
(package private) int |
m_serviceCount
Number of Interface/Service combinations |
(package private) long |
m_totalWindow
Total Window Time. |
Fields inherited from class org.opennms.report.datablock.StandardNamedObject |
|
Constructor Summary | |
Node()
Default Constructor. |
|
Node(java.util.ArrayList interfaces)
Constructor that sets the outages. |
|
Node(java.lang.String name,
java.util.ArrayList interfaces,
int id)
Constructor that sets the name and the outages. |
|
Node(java.lang.String name,
int id)
Constructor that initialises the nodeid. |
Method Summary | |
void |
addInterface(java.lang.String intfname)
Add Interface with interface name. |
void |
addInterface(java.lang.String intfname,
java.lang.String service)
Add an Interface with interface and service name. |
void |
addInterface(java.lang.String intfname,
java.lang.String service,
long lost)
Add Interface with interface name, service id, lost time. |
void |
addInterface(java.lang.String intfname,
java.lang.String service,
long lost,
long regained)
Adds Interface with interface name, service id, lost time, regained time. |
long |
getBusDownTime()
Returns the total outage on the node during business hours. |
long |
getBusTotalWindow()
Returns the total window for this node during business hours. |
long |
getDownTime()
Returns the total outage on the node. |
Interface |
getInterface(java.lang.String intfname)
Searches the list of interfaces and returns the interface object with name intfname. |
int |
getInterfaceCount()
Returns the number of interfaces. |
java.util.ArrayList |
getInterfaces()
Return the interfaces |
int |
getNodeID()
Return the nodeid |
long |
getOutage(long endTime,
long rollingWindow)
Get the outage for this node. |
double |
getPercentAvail()
Returns the percentage availability on the node. |
double |
getPercentAvail(long endTime,
long rollingWindow)
Computes the availability of the node. |
double |
getPercentBusAvail()
Returns the percentage availability on the node during business hours. |
int |
getServiceAffectCount()
Returns the service affected count. |
int |
getServiceCount()
Returns the number of unique interface/service combinations. |
long |
getTotalWindow()
Returns the total window for this node. |
boolean |
hasOutages()
Indicates whether the node has outages. |
java.lang.String |
toString()
Returns the string that displays the Node/Interface/Service/Outages combinations. |
Methods inherited from class org.opennms.report.datablock.StandardNamedObject |
getName, setName |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
private static final java.lang.String LOG4J_CATEGORY
private java.util.ArrayList m_interfaces
private boolean m_hasOutage
long m_downTime
long m_totalWindow
long m_busDownTime
long m_busTotalWindow
double m_percentAvail
double m_percentBusAvail
int m_serviceCount
int m_nodeid
Constructor Detail |
public Node()
public Node(java.lang.String name, int id)
public Node(java.lang.String name, java.util.ArrayList interfaces, int id)
name
- Name of the service.interfaces
- interfaces to be set for this node.id
- node id.public Node(java.util.ArrayList interfaces)
interfaces
- Interfaces for this node to be set.Method Detail |
public boolean hasOutages()
public long getDownTime()
public long getBusDownTime()
public double getPercentAvail()
public double getPercentBusAvail()
public int getServiceCount()
public int getInterfaceCount()
public long getBusTotalWindow()
public long getTotalWindow()
public java.util.ArrayList getInterfaces()
public int getNodeID()
public int getServiceAffectCount()
public void addInterface(java.lang.String intfname)
intfname
- interface name Checks if the interface with name intfname
exists. If not, adds a new interface with name intfname.public void addInterface(java.lang.String intfname, java.lang.String service)
intfname
- interface nameservice
- service name Checks if the interface with name intfname
exists. If so, adds service to that interface. Otherwise, adds
a new interface with name intfname and service.public void addInterface(java.lang.String intfname, java.lang.String service, long lost)
intfname
- Interface nameservice
- Service namelost
- Lost time Checks if the interface with name intfname exists.
If so, adds service to that interface. Otherwise, adds a new
interface with name intfname and service, and adds an outage
with losttime as lost.public Interface getInterface(java.lang.String intfname)
public void addInterface(java.lang.String intfname, java.lang.String service, long lost, long regained)
intfname
- Interface nameservice
- Service namelost
- Lost timeregained
- Regained time. Checks if the interface with name intfname
exists. If so, adds service to that interface. Otherwise, adds
a new interface with name intfname and service, and adds an
outage with losttime as lost and regained time as regained.public double getPercentAvail(long endTime, long rollingWindow)
endTime
- End Time of the rolling window in milliseconds.
public long getOutage(long endTime, long rollingWindow)
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 |