|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.util.AbstractCollection<E>
java.util.AbstractList<E>
java.util.ArrayList
org.opennms.report.datablock.OutageSvcTimesList
public class OutageSvcTimesList
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
| Field Summary |
|---|
| 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, 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, 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, removeAll, retainAll, subList |
| Constructor Detail |
|---|
public OutageSvcTimesList()
ArrayList.ArrayList()public OutageSvcTimesList(int initialCapacity)
ArrayList.ArrayList(int initCapacity)| Method Detail |
|---|
public 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 lost
public long getDownTime(long curTime,
long rollingWindow)
curTime - the current time from which the down time is to be calculatedrollingWindow - the last window for which the downtime is to be calculated
public java.util.List getServiceOutages(java.lang.String nodeName,
long curTime,
long rollingWindow)
curTime - the current time from which the down time is to be calculatedrollingWindow - the last window for which the downtime is to be calculatedpublic java.lang.String toString()
toString in class java.util.AbstractCollection
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||