Package org.opennms.netmgt.xml.eventconf
Class Events
- java.lang.Object
-
- org.opennms.netmgt.xml.eventconf.Events
-
- All Implemented Interfaces:
java.io.Serializable
public class Events extends java.lang.Object implements java.io.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(java.lang.String eventFile)
void
addLoadedEventFile(java.lang.String relativePath, Events events)
boolean
equals(java.lang.Object obj)
Event
findFirstMatchingEvent(Event matchingEvent)
Event
findFirstMatchingEvent(Events.EventCriteria criteria)
<T> T
forEachEvent(T initial, Events.EventCallback<T> callback)
Event
getEventByUeiOptimistic(java.lang.String uei)
Quick-look for Events by UEI with the caveat that not all Events can be looked up this way.java.util.List<java.lang.String>
getEventFiles()
java.util.List<Event>
getEvents()
Global
getGlobal()
Events
getLoadEventsByFile(java.lang.String relativePath)
EventOrdering
getOrdering()
int
hashCode()
void
initialize(Partition partition, EventOrdering eventOrdering)
boolean
isSecureTag(java.lang.String tag)
java.util.Map<java.lang.String,java.lang.Long>
loadEventFiles(org.springframework.core.io.Resource configResource)
void
loadEventFilesIfModified(org.springframework.core.io.Resource configResource, java.util.Map<java.lang.String,java.lang.Long> lastModifiedEventFiles)
boolean
removeEvent(Event event)
boolean
removeEventFile(java.lang.String eventFile)
void
removeLoadedEventFile(java.lang.String relativePath)
void
save(org.springframework.core.io.Resource resource)
void
saveEvents(org.springframework.core.io.Resource resource)
void
setEventFiles(java.util.List<java.lang.String> eventFiles)
void
setEvents(java.util.List<Event> events)
void
setGlobal(Global global)
-
-
-
Method Detail
-
getGlobal
public Global getGlobal()
-
setGlobal
public void setGlobal(Global global)
-
getEvents
public java.util.List<Event> getEvents()
-
setEvents
public void setEvents(java.util.List<Event> events)
-
addEvent
public void addEvent(Event event)
-
removeEvent
public boolean removeEvent(Event event)
-
getEventFiles
public java.util.List<java.lang.String> getEventFiles()
-
setEventFiles
public void setEventFiles(java.util.List<java.lang.String> eventFiles)
-
addEventFile
public void addEventFile(java.lang.String eventFile)
-
removeEventFile
public boolean removeEventFile(java.lang.String eventFile)
-
getOrdering
public EventOrdering getOrdering()
-
loadEventFiles
public java.util.Map<java.lang.String,java.lang.Long> loadEventFiles(org.springframework.core.io.Resource configResource) throws java.io.IOException
- Throws:
java.io.IOException
-
loadEventFilesIfModified
public void loadEventFilesIfModified(org.springframework.core.io.Resource configResource, java.util.Map<java.lang.String,java.lang.Long> lastModifiedEventFiles) throws java.io.IOException
- Throws:
java.io.IOException
-
isSecureTag
public boolean isSecureTag(java.lang.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)
-
getLoadEventsByFile
public Events getLoadEventsByFile(java.lang.String relativePath)
-
addLoadedEventFile
public void addLoadedEventFile(java.lang.String relativePath, Events events)
-
removeLoadedEventFile
public void removeLoadedEventFile(java.lang.String relativePath)
-
saveEvents
public void saveEvents(org.springframework.core.io.Resource resource)
-
save
public void save(org.springframework.core.io.Resource resource)
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
getEventByUeiOptimistic
public Event getEventByUeiOptimistic(java.lang.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
-
-