|
OpenNMS API 1.2.3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.AbstractMap
java.util.HashMap
java.util.LinkedHashMap
org.opennms.netmgt.eventd.datablock.EventKey
The key for an event - it extends the Hashtable and basically is a map of name/value pairs of the 'maskelements' block in the event. While the names are maskelement names, - if the event is a 'org.opennms.netmgt.xml.eventconf.Event', the maskvalue list is taken as the value - if the event is an 'org.opennms.netmgt.xml.event.Event', the value in the event for the mask element is used as the value. This hashtable is pretty much constant once constructed - so the hashcode is evaluated once at construction and reused(if new values are added or values changed, hashcode is re-evaluated)
Nested Class Summary |
Nested classes inherited from class java.util.LinkedHashMap |
|
Nested classes inherited from class java.util.HashMap |
|
Nested classes inherited from class java.util.AbstractMap |
|
Field Summary | |
private int |
m_hashCode
The hash code calculated from the elements |
static java.lang.String |
TAG_HOST
The event host xml tag |
static java.lang.String |
TAG_INTERFACE
The event interface xml tag |
static java.lang.String |
TAG_NODEID
The event nodeid xml tag |
static java.lang.String |
TAG_SERVICE
The event service xml tag |
static java.lang.String |
TAG_SNMP_COMMUNITY
The SNMP community xml tag |
static java.lang.String |
TAG_SNMP_EID
The SNMP EID xml tag |
static java.lang.String |
TAG_SNMP_GENERIC
The SNMP generic xml tag |
static java.lang.String |
TAG_SNMP_SPECIFIC
The SNMP specific xml tag |
static java.lang.String |
TAG_SNMPHOST
The event snmp host xml tag |
static java.lang.String |
TAG_SOURCE
The event source xml tag |
static java.lang.String |
TAG_UEI
The UEI xml tag |
Fields inherited from class java.util.LinkedHashMap |
|
Fields inherited from class java.util.HashMap |
|
Fields inherited from class java.util.AbstractMap |
|
Constructor Summary | |
EventKey()
Default constructor for this class |
|
EventKey(Event event)
Constructor for this class |
|
EventKey(Event event)
Constructor for this class |
|
EventKey(int initCapacity)
Constructor for this class |
|
EventKey(int initCapacity,
float loadFactor)
Constructor for this class |
|
EventKey(java.util.Map maskelements)
Constructor for this class |
Method Summary | |
void |
clear()
Override to re-evaluate hashcode |
int |
compareTo(java.lang.Object o)
Implementation for the Comparable interface |
void |
evaluateHashCode()
Evaluate the hash code for this object This hashtable gets constructed once and does not really change - so hashcode is only evaluated at construction time. |
static java.lang.String |
getMaskElementValue(Event event,
java.lang.String mename)
Get the value of the mask element for this event. |
int |
hashCode()
Overrides the 'hashCode()' method in the superclass |
java.lang.Object |
put(java.lang.Object key,
java.lang.Object value)
Override to re-evaluate hashcode |
void |
putAll(java.util.Map m)
Override to re-evaluate hashcode |
java.lang.Object |
remove(java.lang.Object key)
Override to re-evaluate hashcode |
java.lang.String |
toString()
Returns a String equivalent of this object |
Methods inherited from class java.util.LinkedHashMap |
containsValue, get, removeEldestEntry |
Methods inherited from class java.util.HashMap |
clone, containsKey, entrySet, isEmpty, keySet, size, values |
Methods inherited from class java.util.AbstractMap |
equals |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.Map |
equals |
Field Detail |
public static final java.lang.String TAG_UEI
public static final java.lang.String TAG_SOURCE
public static final java.lang.String TAG_NODEID
public static final java.lang.String TAG_HOST
public static final java.lang.String TAG_INTERFACE
public static final java.lang.String TAG_SNMPHOST
public static final java.lang.String TAG_SERVICE
public static final java.lang.String TAG_SNMP_EID
public static final java.lang.String TAG_SNMP_SPECIFIC
public static final java.lang.String TAG_SNMP_GENERIC
public static final java.lang.String TAG_SNMP_COMMUNITY
private int m_hashCode
Constructor Detail |
public EventKey()
public EventKey(int initCapacity)
Hashtable.Hashtable(int)
public EventKey(int initCapacity, float loadFactor)
Hashtable.Hashtable(int, float)
public EventKey(java.util.Map maskelements)
maskelements
- the maskelements that should form this keypublic EventKey(Event event)
event
- the config event that this will be the key forpublic EventKey(Event event)
event
- the event that this will be the key forMethod Detail |
public void clear()
clear
in interface java.util.Map
Hashtable.clear()
public java.lang.Object put(java.lang.Object key, java.lang.Object value)
put
in interface java.util.Map
Hashtable.put(Object, Object)
public void putAll(java.util.Map m)
putAll
in interface java.util.Map
Hashtable.putAll(Map)
public java.lang.Object remove(java.lang.Object key)
remove
in interface java.util.Map
Hashtable.remove(Object)
public void evaluateHashCode()
Evaluate the hash code for this object This hashtable gets constructed once and does not really change - so hashcode is only evaluated at construction time. Also, while the superclass uses just the entry set to calculate the hashcode, this uses both the names and their values in calculating the hashcode
public int compareTo(java.lang.Object o)
compareTo
in interface java.lang.Comparable
Comparable.compareTo(Object)
public int hashCode()
hashCode
in interface java.util.Map
public java.lang.String toString()
public static java.lang.String getMaskElementValue(Event event, java.lang.String mename)
Get the value of the mask element for this event. Note: The only event elements that can occur to uniquely identify an event are - uei, source, host, snmphost, nodeid, interface, service, id(SNMP EID), specific, generic, community
|
OpenNMS API 1.2.3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |