public class EventKey extends LinkedHashMap<String,Object> implements Serializable, Comparable<EventKey>
 The key for an event - it extends the LinkedHashMap 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)
 AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>| Modifier and Type | Field and Description | 
|---|---|
static String | 
TAG_HOST
The event host xml tag 
 | 
static String | 
TAG_INTERFACE
The event interface xml tag 
 | 
static String | 
TAG_NODEID
The event nodeid xml tag 
 | 
static String | 
TAG_SERVICE
The event service xml tag 
 | 
static String | 
TAG_SNMP_COMMUNITY
The SNMP community xml tag 
 | 
static String | 
TAG_SNMP_EID
The SNMP EID xml tag 
 | 
static String | 
TAG_SNMP_GENERIC
The SNMP generic xml tag 
 | 
static String | 
TAG_SNMP_SPECIFIC
The SNMP specific xml tag 
 | 
static String | 
TAG_SNMPHOST
The event snmp host xml tag 
 | 
static String | 
TAG_SOURCE
The event source xml tag 
 | 
static String | 
TAG_UEI
The UEI xml tag 
 | 
| Constructor and Description | 
|---|
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(Map<String,Object> maskelements)
Constructor for this class 
 | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
clear()
Override to re-evaluate hashcode 
 | 
int | 
compareTo(EventKey obj)
Implementation for the Comparable interface 
 | 
static String | 
getMaskElementValue(Event event,
                   String mename)
 Get the value of the mask element for this event. 
 | 
int | 
hashCode()
Overrides the 'hashCode()' method in the superclass 
 | 
Object | 
put(String key,
   Object value)
 Override to re-evaluate hashcode 
 | 
void | 
putAll(Map<? extends String,? extends Object> m)
 Override to re-evaluate hashcode 
 | 
Object | 
remove(Object key)
 Override to re-evaluate hashcode 
 | 
String | 
toString()
Returns a String equivalent of this object 
 | 
containsValue, entrySet, forEach, get, getOrDefault, keySet, removeEldestEntry, replaceAll, valuesclone, compute, computeIfAbsent, computeIfPresent, containsKey, isEmpty, merge, putIfAbsent, remove, replace, replace, sizeequalsfinalize, getClass, notify, notifyAll, wait, wait, waitcompute, computeIfAbsent, computeIfPresent, containsKey, equals, isEmpty, merge, putIfAbsent, remove, replace, replace, sizepublic static final String TAG_UEI
public static final String TAG_SOURCE
public static final String TAG_NODEID
public static final String TAG_HOST
public static final String TAG_INTERFACE
public static final String TAG_SNMPHOST
public static final String TAG_SERVICE
public static final String TAG_SNMP_EID
public static final String TAG_SNMP_SPECIFIC
public static final String TAG_SNMP_GENERIC
public static final String TAG_SNMP_COMMUNITY
public EventKey()
public EventKey(int initCapacity)
initCapacity - a int.HashMap.HashMap(int)public EventKey(int initCapacity,
                float loadFactor)
initCapacity - a int.loadFactor - a float.HashMap.HashMap(int, float)public EventKey(Map<String,Object> 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 forpublic void clear()
clear in interface Map<String,Object>clear in class LinkedHashMap<String,Object>HashMap.clear()public void putAll(Map<? extends String,? extends Object> m)
public int compareTo(EventKey obj)
compareTo in interface Comparable<EventKey>obj - a EventKey object.Comparable.compareTo(Object)public int hashCode()
public String toString()
toString in class AbstractMap<String,Object>public static String getMaskElementValue(Event event, 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
Copyright © 2020. All rights reserved.