org.opennms.netmgt.outage
Class OutageEventCache
java.lang.Object
java.util.AbstractCollection
java.util.AbstractList
java.util.AbstractSequentialList
java.util.LinkedList
org.opennms.netmgt.outage.OutageEventCache
- All Implemented Interfaces:
- java.lang.Cloneable, java.util.Collection, java.util.List, java.io.Serializable
- public final class OutageEventCache
- extends java.util.LinkedList
This class will help solve a current intermittant bug where the resolution to
an error event is received before the error event itself, due to the database
being busy,
If an "up" is received without a matching "down", the event will be saved off
to the cache. Thus, when the "down" is received, it can be matched against
the events in this cache to see if it has actually been resolved.
- Author:
- Tarus
- See Also:
- Serialized Form
Nested classes inherited from class java.util.LinkedList |
|
Nested classes inherited from class java.util.AbstractList |
|
Fields inherited from class java.util.LinkedList |
|
Fields inherited from class java.util.AbstractList |
modCount |
Method Summary |
boolean |
add(java.lang.Object o)
Adds an object to the cache. |
OutageEventEntry |
findCacheMatch(long eventId,
long nodeId,
java.lang.String ipAddr,
long serviceId,
java.lang.String eventTime,
int type)
When called, this method will try to find a match for the "unmatched"
error event. |
static OutageEventCache |
getInstance()
Returns the SelectEventArchive singleton. |
Methods inherited from class java.util.LinkedList |
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_singleton
private static final OutageEventCache m_singleton
- Singleton instance of the ServiceEventArchive class
OutageEventCache
public OutageEventCache()
getInstance
public static OutageEventCache getInstance()
- Returns the SelectEventArchive singleton.
add
public boolean add(java.lang.Object o)
- Adds an object to the cache.
findCacheMatch
public OutageEventEntry findCacheMatch(long eventId,
long nodeId,
java.lang.String ipAddr,
long serviceId,
java.lang.String eventTime,
int type)
- When called, this method will try to find a match for the "unmatched"
error event. It will search from least to most severe -> UNRESPONSIVE
LOST_SERVICE, INTERFACE_DOWN and NODE_DOWN. If a match is made, the event
from the cache is returned, otherwise null.
- Parameters:
eventId
- Event idnodeId
- Event node IDipAddr
- Event IP addressserviceId
- Event service IDeventTime
- Event timestamptype
- Event type (service lost, service regained, etc...)
- Returns:
- the matching entry from the cache
Generated by eevans on May 29 2005 2015.