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 interface
Events.EventCallback<T>
static interface
Events.EventCriteria
-
Constructor Summary
Constructors Constructor Description Events()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addEvent(Event event)
void
addEventFile(String eventFile)
void
addLoadedEventFile(String relativePath, Events events)
boolean
equals(Object obj)
Event
findFirstMatchingEvent(Event matchingEvent)
Event
findFirstMatchingEvent(Events.EventCriteria criteria)
<T> T
forEachEvent(T initial, Events.EventCallback<T> callback)
Event
getEventByUeiOptimistic(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()
Global
getGlobal()
Events
getLoadEventsByFile(String relativePath)
EventOrdering
getOrdering()
int
hashCode()
void
initialize(Partition partition, EventOrdering eventOrdering)
boolean
isSecureTag(String tag)
Map<String,Long>
loadEventFiles(org.springframework.core.io.Resource configResource)
void
loadEventFilesIfModified(org.springframework.core.io.Resource configResource, Map<String,Long> lastModifiedEventFiles)
boolean
removeEvent(Event event)
boolean
removeEventFile(String eventFile)
void
removeLoadedEventFile(String relativePath)
void
save(org.springframework.core.io.Resource resource)
void
saveEvents(org.springframework.core.io.Resource resource)
void
setEventFiles(List<String> eventFiles)
void
setEvents(List<Event> events)
void
setGlobal(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
-
-