public final class FilterServiceLockCoarse extends FilterServiceBase
Constructor and Description |
---|
FilterServiceLockCoarse(boolean allowIsolation) |
Modifier and Type | Method and Description |
---|---|
void |
acquireWriteLock() |
FilterServiceEntry |
add(FilterValueSet filterValueSet,
FilterHandle callback)
Add a filter for events as defined by the filter specification, and register a
callback to be invoked upon evaluation of an event that matches the filter spec.
|
void |
apply(FilterSet filterSet)
Apply a set of previously taken filters.
|
long |
evaluate(EventBean theEvent,
Collection<FilterHandle> matches)
Finds matching filters to the event passed in and collects their associated callback method.
|
long |
evaluate(EventBean theEvent,
Collection<FilterHandle> matches,
int statementId)
Finds matching filters to the event passed in and collects their associated callback method, for a particular statement only
|
void |
releaseWriteLock() |
void |
remove(FilterHandle callback,
FilterServiceEntry filterServiceEntry)
Remove a filter callback.
|
void |
removeType(EventType type) |
FilterSet |
take(Set<Integer> statementId)
Take a set of statements of out the active filters, returning a save-set of filters.
|
addFilterServiceListener, addInternal, applyInternal, destroy, evaluateInternal, evaluateInternal, getCountTypes, getFilterCountApprox, getFiltersVersion, getNumEventsEvaluated, init, isSupportsTakeApply, removeFilterServiceListener, removeInternal, removeTypeInternal, resetStats, takeInternal
public void acquireWriteLock()
public void releaseWriteLock()
public FilterSet take(Set<Integer> statementId)
FilterServiceSPI
statementId
- statement ids to removepublic void apply(FilterSet filterSet)
FilterServiceSPI
filterSet
- to applypublic long evaluate(EventBean theEvent, Collection<FilterHandle> matches)
FilterService
theEvent
- is the event to be matched against filtersmatches
- is a collection that is populated via add method with any handles for matching filterspublic long evaluate(EventBean theEvent, Collection<FilterHandle> matches, int statementId)
FilterService
theEvent
- is the event to be matched against filtersmatches
- is a collection that is populated via add method with any handles for matching filtersstatementId
- statement for which to return results forpublic FilterServiceEntry add(FilterValueSet filterValueSet, FilterHandle callback)
FilterService
filterValueSet
- is a specification of filter parameters, contains
event type information, event property values and operatorscallback
- is the callback to be invoked when the filter matches an eventpublic void remove(FilterHandle callback, FilterServiceEntry filterServiceEntry)
FilterService
callback
- is the callback to be removedfilterServiceEntry
- entrypublic void removeType(EventType type)