org.opennms.report.availability
Class AvailabilityData

java.lang.Object
  extended by org.opennms.report.availability.AvailabilityData

public class AvailabilityData
extends java.lang.Object

AvailabilityData collects all the outages for all node/ip/service combination and stores it appropriately in the m_nodes structure.

Author:
Jacinta Remedios , Oculan

Constructor Summary
AvailabilityData(java.lang.String categoryName, Report report, java.lang.String monthFormat, java.util.Calendar calendar, java.lang.String startMonth, java.lang.String startDate, java.lang.String startYear)
           
AvailabilityData(java.lang.String categoryName, Report report, java.lang.String format, java.lang.String monthFormat, java.util.Calendar calendar, java.util.Date periodEndDate)
           
AvailabilityData(java.lang.String categoryName, Report report, java.lang.String format, java.lang.String monthFormat, java.util.Calendar calendar, java.lang.String startMonth, java.lang.String startDate, java.lang.String startYear)
           
 
Method Summary
 void addNode(java.lang.String nodeName, int nodeid, java.lang.String ipaddr, java.lang.String serviceid, long losttime, long regainedtime)
          This method adds a unique tuple to the list of nodes m_nodes.
 void closeConnection()
          Closes the database connection.
 java.util.List getNodes()
          Returns the nodes.
 java.util.TreeMap getPercentNode()
          Returns percent/node combinations for the last month.
 void initialiseConnection()
          Initialises the database connection.
 void initializeInterval(java.util.Calendar calendar, java.util.Date periodEndDate)
          Initialise the endTime, start Time, last Months end time and number of days in the last month.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AvailabilityData

public AvailabilityData(java.lang.String categoryName,
                        Report report,
                        java.lang.String monthFormat,
                        java.util.Calendar calendar,
                        java.lang.String startMonth,
                        java.lang.String startDate,
                        java.lang.String startYear)
                 throws java.io.IOException,
                        org.exolab.castor.xml.MarshalException,
                        org.exolab.castor.xml.ValidationException,
                        java.lang.Exception
Throws:
java.io.IOException
org.exolab.castor.xml.MarshalException
org.exolab.castor.xml.ValidationException
java.lang.Exception

AvailabilityData

public AvailabilityData(java.lang.String categoryName,
                        Report report,
                        java.lang.String format,
                        java.lang.String monthFormat,
                        java.util.Calendar calendar,
                        java.lang.String startMonth,
                        java.lang.String startDate,
                        java.lang.String startYear)
                 throws java.io.IOException,
                        org.exolab.castor.xml.MarshalException,
                        org.exolab.castor.xml.ValidationException,
                        java.lang.Exception
Throws:
java.io.IOException
org.exolab.castor.xml.MarshalException
org.exolab.castor.xml.ValidationException
java.lang.Exception

AvailabilityData

public AvailabilityData(java.lang.String categoryName,
                        Report report,
                        java.lang.String format,
                        java.lang.String monthFormat,
                        java.util.Calendar calendar,
                        java.util.Date periodEndDate)
                 throws java.io.IOException,
                        org.exolab.castor.xml.MarshalException,
                        org.exolab.castor.xml.ValidationException,
                        java.lang.Exception
Throws:
java.io.IOException
org.exolab.castor.xml.MarshalException
org.exolab.castor.xml.ValidationException
java.lang.Exception
Method Detail

initializeInterval

public void initializeInterval(java.util.Calendar calendar,
                               java.util.Date periodEndDate)
Initialise the endTime, start Time, last Months end time and number of days in the last month.


getNodes

public java.util.List getNodes()
Returns the nodes.


initialiseConnection

public void initialiseConnection()
                          throws java.io.IOException,
                                 org.exolab.castor.xml.MarshalException,
                                 org.exolab.castor.xml.ValidationException,
                                 java.lang.ClassNotFoundException,
                                 java.sql.SQLException
Initialises the database connection.

Throws:
java.io.IOException
org.exolab.castor.xml.MarshalException
org.exolab.castor.xml.ValidationException
java.lang.ClassNotFoundException
java.sql.SQLException

closeConnection

public void closeConnection()
Closes the database connection.


getPercentNode

public java.util.TreeMap getPercentNode()
Returns percent/node combinations for the last month. This is used to get the last months top 20 offenders


addNode

public void addNode(java.lang.String nodeName,
                    int nodeid,
                    java.lang.String ipaddr,
                    java.lang.String serviceid,
                    long losttime,
                    long regainedtime)
This method adds a unique tuple to the list of nodes m_nodes.



Copyright © 2007. All Rights Reserved.