OpenNMS API 1.2.3

org.opennms.report.datablock
Class OutageSvcTimesList

java.lang.Object
  extended byjava.util.AbstractCollection
      extended byjava.util.AbstractList
          extended byjava.util.ArrayList
              extended byorg.opennms.report.datablock.OutageSvcTimesList
All Implemented Interfaces:
java.lang.Cloneable, java.util.Collection, java.util.List, java.util.RandomAccess, java.io.Serializable

public class OutageSvcTimesList
extends java.util.ArrayList

 This contains a list of service lost/regained set/pair. 
 
  Also maintains the outage/down time each time it is calculated and the time
  from which this was calculated - this is done so when the view outage time for
  a window is calculated, the same calculations are not done on the node multiple
  times

Author:
<A HREF="mailto:jacinta@oculan.com">Jacinta Remedios</A>, <A HREF="http://www.oculan.com">oculan.org</A>
See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class java.util.AbstractList
 
Field Summary
private  long m_busOutTime
          The outage time computed during business hours.
private  long m_outTime
          The outage time computed since 'm_outTimeSince'
private  long m_outTimeSince
          The time from which the current outtime 'm_outTime' is calculated
 
Fields inherited from class java.util.ArrayList
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
OutageSvcTimesList()
          Default constructor
OutageSvcTimesList(int initialCapacity)
          Constructor
 
Method Summary
 void addSvcTime(long losttime)
          Add a new service time entry
 void addSvcTime(long losttime, long regainedtime)
          Add a new servicetime entry
 long getDownTime(long curTime, long rollingWindow)
          Calculate the total downtime in this list of service times for the last 'rollinWindow' time starting at 'curTime'
 java.util.List getServiceOutages(java.lang.String nodeName, long curTime, long rollingWindow)
          Returns a list of outage / out-since pairs for the rolling window specified
 java.lang.String toString()
           
 
Methods inherited from class java.util.ArrayList
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, removeRange, set, size, toArray, toArray, trimToSize
 
Methods inherited from class java.util.AbstractList
equals, hashCode, iterator, listIterator, listIterator, subList
 
Methods inherited from class java.util.AbstractCollection
containsAll, remove, removeAll, retainAll
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
containsAll, equals, hashCode, iterator, listIterator, listIterator, remove, removeAll, retainAll, subList
 

Field Detail

m_outTimeSince

private long m_outTimeSince
The time from which the current outtime 'm_outTime' is calculated


m_outTime

private long m_outTime
The outage time computed since 'm_outTimeSince'


m_busOutTime

private long m_busOutTime
The outage time computed during business hours.

Constructor Detail

OutageSvcTimesList

public OutageSvcTimesList()
Default constructor

See Also:
ArrayList.ArrayList()

OutageSvcTimesList

public OutageSvcTimesList(int initialCapacity)
Constructor

See Also:
ArrayList.ArrayList(int initCapacity)
Method Detail

addSvcTime

public void addSvcTime(long losttime,
                       long regainedtime)
Add a new servicetime entry

Parameters:
losttime - time at which service was lost
regainedtime - time at which service was regained

addSvcTime

public void addSvcTime(long losttime)
Add a new service time entry

Parameters:
losttime - time at which service was lost

getDownTime

public long getDownTime(long curTime,
                        long rollingWindow)
Calculate the total downtime in this list of service times for the last 'rollinWindow' time starting at 'curTime'

Parameters:
curTime - the current time from which the down time is to be calculated
rollingWindow - the last window for which the downtime is to be calculated
Returns:
total down time in service times in this list

getServiceOutages

public java.util.List getServiceOutages(java.lang.String nodeName,
                                        long curTime,
                                        long rollingWindow)
Returns a list of outage / out-since pairs for the rolling window specified

Parameters:
curTime - the current time from which the down time is to be calculated
rollingWindow - the last window for which the downtime is to be calculated

toString

public java.lang.String toString()

OpenNMS API 1.2.3

Generated by eevans on May 29 2005 2015.