org.opennms.report.availability
Class AvailabilityData

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

public class AvailabilityData
extends 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(String categoryName, Report report, String monthFormat, Calendar calendar, String startMonth, String startDate, String startYear)
           
AvailabilityData(String categoryName, Report report, String format, String monthFormat, Calendar calendar, Date periodEndDate)
           
AvailabilityData(String categoryName, Report report, String format, String monthFormat, Calendar calendar, String startMonth, String startDate, String startYear)
           
 
Method Summary
 void addNode(String nodeName, int nodeid, String ipaddr, 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.
 List<Node> getNodes()
          Returns the nodes.
 TreeMap<Double,List<String>> getPercentNode()
          Returns percent/node combinations for the last month.
 void initialiseConnection()
          Initializes the database connection.
 void initializeInterval(Calendar calendar, Date periodEndDate)
          Initialize 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(String categoryName,
                        Report report,
                        String monthFormat,
                        Calendar calendar,
                        String startMonth,
                        String startDate,
                        String startYear)
                 throws IOException,
                        org.exolab.castor.xml.MarshalException,
                        org.exolab.castor.xml.ValidationException,
                        Exception
Throws:
IOException
org.exolab.castor.xml.MarshalException
org.exolab.castor.xml.ValidationException
Exception

AvailabilityData

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

AvailabilityData

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

initializeInterval

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


getNodes

public List<Node> getNodes()
Returns the nodes.


initialiseConnection

public void initialiseConnection()
                          throws IOException,
                                 org.exolab.castor.xml.MarshalException,
                                 org.exolab.castor.xml.ValidationException,
                                 ClassNotFoundException,
                                 SQLException
Initializes the database connection.

Throws:
IOException
org.exolab.castor.xml.MarshalException
org.exolab.castor.xml.ValidationException
ClassNotFoundException
SQLException

closeConnection

public void closeConnection()
Closes the database connection.


getPercentNode

public TreeMap<Double,List<String>> getPercentNode()
Returns percent/node combinations for the last month. This is used to get the last months top 20 offenders


addNode

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



Copyright © 2009. All Rights Reserved.