org.opennms.netmgt.rtc.datablock
Class RTCNodeSvcTimesList
java.lang.Object
java.util.AbstractCollection
java.util.AbstractList
java.util.AbstractSequentialList
java.util.LinkedList
org.opennms.netmgt.rtc.datablock.RTCNodeSvcTimesList
- All Implemented Interfaces:
- java.lang.Cloneable, java.util.Collection, java.util.List, java.io.Serializable
- public class RTCNodeSvcTimesList
- extends java.util.LinkedList
List of service times. This contains a list of service lost/regained set/pair
for the RTCNode.
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 outage time for a
window is calculated, the same calculations are not done on the node multiple
times.
'Expired' outages are removed during 'add' and 'getDownTime' operations.
- Author:
- Sowmya Kumaraswamy , OpenNMS.org
- See Also:
- Serialized Form
Nested classes inherited from class java.util.LinkedList |
|
Nested classes inherited from class java.util.AbstractList |
|
Field Summary |
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.LinkedList |
|
Fields inherited from class java.util.AbstractList |
modCount |
Method Summary |
void |
addSvcTime(long losttime)
Add a new servicetime 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
'rollingWindow' time starting at 'curTime' |
private void |
removeExpiredOutages()
Remove expired outages. |
private void |
removeExpiredOutages(long curTime,
long rollingWindow)
Remove expired outages. |
Methods inherited from class java.util.LinkedList |
add, add, addAll, addAll, addFirst, addLast, clear, clone, contains, get, getFirst, getLast, indexOf, lastIndexOf, listIterator, remove, remove, removeFirst, removeLast, set, size, toArray, toArray |
Methods inherited from class java.util.AbstractSequentialList |
iterator |
Methods inherited from class java.util.AbstractList |
equals, hashCode, listIterator, removeRange, subList |
Methods inherited from class java.util.AbstractCollection |
containsAll, isEmpty, removeAll, retainAll, toString |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.List |
containsAll, equals, hashCode, isEmpty, iterator, listIterator, removeAll, retainAll, subList |
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'
RTCNodeSvcTimesList
public RTCNodeSvcTimesList()
- Default constructor.
removeExpiredOutages
private void removeExpiredOutages()
- Remove expired outages. Remove all closed outages that are not in the the
last 'rollingWindow'
removeExpiredOutages
private void removeExpiredOutages(long curTime,
long rollingWindow)
- Remove expired outages. Remove closed outages that are not in the the
last 'rollingWindow' starting from curTime.
- Parameters:
curTime
- the current time to start from.rollingWindow
- the rolling window to use.
addSvcTime
public void addSvcTime(long losttime,
long regainedtime)
- Add a new servicetime entry.
- Parameters:
losttime
- time at which service was lostregainedtime
- time at which service was regained
addSvcTime
public void addSvcTime(long losttime)
- Add a new servicetime 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
'rollingWindow' time starting at 'curTime'
- Parameters:
curTime
- the current time from which the down time is to be calculatedrollingWindow
- the last window for which the downtime is to be calculated
- Returns:
- total down time in service times in this list
Generated by eevans on May 29 2005 2015.