public class EventTypeIndex extends java.lang.Object implements EventEvaluator
FilterParamIndexBase
and filter callbacks in FilterHandleSetNode
.
This class evaluates events for the purpose of filtering by (1) looking up the event's EventType
and (2) asking the subtree for this event type to evaluate the event.
The class performs all the locking required for multithreaded access.
Constructor and Description |
---|
EventTypeIndex(FilterServiceGranularLockFactory lockFactory)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
add(EventType eventType,
FilterHandleSetNode rootNode)
Add a new event type to the index and use the specified node for the root node of its subtree.
|
void |
destroy()
Destroy the service.
|
FilterHandleSetNode |
get(EventType eventType)
Returns the root node for the given event type, or null if this event type has not been seen before.
|
void |
matchEvent(EventBean theEvent,
java.util.Collection<FilterHandle> matches)
Perform the matching of an event based on the event property values,
adding any callbacks for matches found to the matches list.
|
void |
removeType(EventType type) |
public EventTypeIndex(FilterServiceGranularLockFactory lockFactory)
public void destroy()
public void add(EventType eventType, FilterHandleSetNode rootNode)
eventType
- is the event type to be added to the indexrootNode
- is the root node of the subtree for filter constant indizes and callbackspublic void removeType(EventType type)
public FilterHandleSetNode get(EventType eventType)
eventType
- is an event typepublic void matchEvent(EventBean theEvent, java.util.Collection<FilterHandle> matches)
EventEvaluator
matchEvent
in interface EventEvaluator
theEvent
- is the event object wrapper to obtain event property values frommatches
- accumulates the matching filter callbacks