net.esper.filter
Interface FilterService

All Known Implementing Classes:
FilterServiceImpl

public interface FilterService

Interface for filtering events by event type and event property values. Allows adding and removing filters.

Filters are defined by a FilterSpec and are associated with a FilterCallback callback. Implementations may decide if the same filter callback can be registered twice for different or some filter specifications.

The performance of an implementation of this service is crucial in achieving a high overall event throughput.


Method Summary
 void add(FilterValueSet filterValueSet, FilterCallback 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 evaluate(EventBean event)
          Finds matching filters to the event passed in and invokes their associated callback method.
 int getNumEventsEvaluated()
          Return a count of the number of events evaluated by this service.
 void remove(FilterCallback callback)
          Remove a filter callback.
 

Method Detail

evaluate

void evaluate(EventBean event)
Finds matching filters to the event passed in and invokes their associated callback method.

Parameters:
event - is the event to be matched against filters

add

void add(FilterValueSet filterValueSet,
         FilterCallback 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.

Parameters:
filterValueSet - is a specification of filter parameters, contains event type information, event property values and operators
callback - is the callback to be invoked when the filter matches an event

remove

void remove(FilterCallback callback)
Remove a filter callback.

Parameters:
callback - is the callback to be removed

getNumEventsEvaluated

int getNumEventsEvaluated()
Return a count of the number of events evaluated by this service.

Returns:
count of invocations of evaluate method