|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.espertech.esper.filter.FilterServiceImpl
public final class FilterServiceImpl
Implementation of the filter service interface. Does not allow the same filter callback to be added more then once.
Constructor Summary | |
---|---|
protected |
FilterServiceImpl()
Constructor. |
Method Summary | |
---|---|
void |
add(FilterValueSet filterValueSet,
FilterHandle filterCallback)
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 |
addFilterServiceListener(FilterServiceListener filterServiceListener)
Add activity listener. |
void |
apply(FilterSet filterSet)
Apply a set of previously taken filters. |
void |
destroy()
Destroy the service. |
long |
evaluate(EventBean theEvent,
java.util.Collection<FilterHandle> matches)
Finds matching filters to the event passed in and collects their associated callback method. |
long |
evaluate(EventBean theEvent,
java.util.Collection<FilterHandle> matches,
java.lang.String statementId)
Finds matching filters to the event passed in and collects their associated callback method, for a particular statement only |
int |
getCountTypes()
|
int |
getFilterCountApprox()
|
long |
getFiltersVersion()
Returns filter version. |
long |
getNumEventsEvaluated()
Return a count of the number of events evaluated by this service. |
void |
remove(FilterHandle filterCallback)
Remove a filter callback. |
void |
removeFilterServiceListener(FilterServiceListener filterServiceListener)
Remove activity listener. |
void |
removeType(EventType type)
|
void |
resetStats()
Reset the number of events evaluated |
FilterSet |
take(java.util.Set<java.lang.String> statementIds)
Take a set of statements of out the active filters, returning a save-set of filters. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected FilterServiceImpl()
Method Detail |
---|
public long getFiltersVersion()
FilterService
getFiltersVersion
in interface FilterService
public void destroy()
FilterService
destroy
in interface FilterService
public final void add(FilterValueSet filterValueSet, FilterHandle filterCallback)
FilterService
add
in interface FilterService
filterValueSet
- is a specification of filter parameters, contains
event type information, event property values and operatorsfilterCallback
- is the callback to be invoked when the filter matches an eventpublic final void remove(FilterHandle filterCallback)
FilterService
remove
in interface FilterService
filterCallback
- is the callback to be removedpublic final long evaluate(EventBean theEvent, java.util.Collection<FilterHandle> matches)
FilterService
evaluate
in interface FilterService
theEvent
- is the event to be matched against filtersmatches
- is a collection that is populated via add method with any handles for matching filters
public final long evaluate(EventBean theEvent, java.util.Collection<FilterHandle> matches, java.lang.String statementId)
FilterService
evaluate
in interface 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 for
public final long getNumEventsEvaluated()
FilterService
getNumEventsEvaluated
in interface FilterService
public void resetStats()
FilterService
resetStats
in interface FilterService
public void addFilterServiceListener(FilterServiceListener filterServiceListener)
FilterServiceSPI
addFilterServiceListener
in interface FilterServiceSPI
filterServiceListener
- to addpublic void removeFilterServiceListener(FilterServiceListener filterServiceListener)
FilterServiceSPI
removeFilterServiceListener
in interface FilterServiceSPI
filterServiceListener
- to removepublic FilterSet take(java.util.Set<java.lang.String> statementIds)
FilterServiceSPI
take
in interface FilterServiceSPI
statementIds
- statement ids to remove
public void apply(FilterSet filterSet)
FilterServiceSPI
apply
in interface FilterServiceSPI
filterSet
- to applypublic int getFilterCountApprox()
getFilterCountApprox
in interface FilterServiceSPI
public int getCountTypes()
getCountTypes
in interface FilterServiceSPI
public void removeType(EventType type)
removeType
in interface FilterService
|
© 2006-2014 EsperTech Inc. All rights reserved. Visit us at espertech.com |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |