Package org.opennms.netmgt.xml.eventconf
Class Events
- java.lang.Object
-
- org.opennms.netmgt.xml.eventconf.Events
-
- All Implemented Interfaces:
Serializable
public class Events extends Object implements Serializable
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceEvents.EventCallback<T>static interfaceEvents.EventCriteria
-
Constructor Summary
Constructors Constructor Description Events()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddEvent(Event event)voidaddEventFile(String eventFile)voidaddLoadedEventFile(String relativePath, Events events)booleanequals(Object obj)EventfindFirstMatchingEvent(Event matchingEvent)EventfindFirstMatchingEvent(Events.EventCriteria criteria)<T> TforEachEvent(T initial, Events.EventCallback<T> callback)EventgetEventByUeiOptimistic(String uei)Quick-look for Events by UEI with the caveat that not all Events can be looked up this way.List<String>getEventFiles()List<Event>getEvents()GlobalgetGlobal()EventsgetLoadEventsByFile(String relativePath)EventOrderinggetOrdering()inthashCode()voidinitialize(Partition partition, EventOrdering eventOrdering)booleanisSecureTag(String tag)Map<String,Long>loadEventFiles(org.springframework.core.io.Resource configResource)voidloadEventFilesIfModified(org.springframework.core.io.Resource configResource, Map<String,Long> lastModifiedEventFiles)booleanremoveEvent(Event event)booleanremoveEventFile(String eventFile)voidremoveLoadedEventFile(String relativePath)voidsave(org.springframework.core.io.Resource resource)voidsaveEvents(org.springframework.core.io.Resource resource)voidsetEventFiles(List<String> eventFiles)voidsetEvents(List<Event> events)voidsetGlobal(Global global)
-
-
-
Method Detail
-
getGlobal
public Global getGlobal()
-
setGlobal
public void setGlobal(Global global)
-
addEvent
public void addEvent(Event event)
-
removeEvent
public boolean removeEvent(Event event)
-
addEventFile
public void addEventFile(String eventFile)
-
removeEventFile
public boolean removeEventFile(String eventFile)
-
getOrdering
public EventOrdering getOrdering()
-
loadEventFiles
public Map<String,Long> loadEventFiles(org.springframework.core.io.Resource configResource) throws IOException
- Throws:
IOException
-
loadEventFilesIfModified
public void loadEventFilesIfModified(org.springframework.core.io.Resource configResource, Map<String,Long> lastModifiedEventFiles) throws IOException- Throws:
IOException
-
isSecureTag
public boolean isSecureTag(String tag)
-
findFirstMatchingEvent
public Event findFirstMatchingEvent(Events.EventCriteria criteria)
-
forEachEvent
public <T> T forEachEvent(T initial, Events.EventCallback<T> callback)
-
initialize
public void initialize(Partition partition, EventOrdering eventOrdering)
-
removeLoadedEventFile
public void removeLoadedEventFile(String relativePath)
-
saveEvents
public void saveEvents(org.springframework.core.io.Resource resource)
-
save
public void save(org.springframework.core.io.Resource resource)
-
getEventByUeiOptimistic
public Event getEventByUeiOptimistic(String uei)
Quick-look for Events by UEI with the caveat that not all Events can be looked up this way. This function can be used a first pass when attempting to lookup events by UEI. The caller should fall back to other means if no match is found - having no results returned by this function does not necessarily mean that an Event with the given UEI does not exist.- Parameters:
uei- UEI to lookup- Returns:
- matching Event, or {@link null} if none was found in the index
-
-