com.espertech.esper.filter
Class FilterServiceLockFine

java.lang.Object
  extended by com.espertech.esper.filter.FilterServiceBase
      extended by com.espertech.esper.filter.FilterServiceLockFine
All Implemented Interfaces:
FilterService, FilterServiceSPI

public final class FilterServiceLockFine
extends FilterServiceBase


Constructor Summary
FilterServiceLockFine()
           
 
Method Summary
 void acquireWriteLock()
           
 void 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, 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
 void releaseWriteLock()
           
 void remove(FilterHandle callback)
          Remove a filter callback.
 void removeType(EventType type)
           
 FilterSet take(java.util.Set<java.lang.String> statementId)
          Take a set of statements of out the active filters, returning a save-set of filters.
 
Methods inherited from class com.espertech.esper.filter.FilterServiceBase
addFilterServiceListener, addInternal, applyInternal, destroy, evaluateInternal, evaluateInternal, getCountTypes, getFilterCountApprox, getFiltersVersion, getNumEventsEvaluated, removeFilterServiceListener, removeInternal, removeTypeInternal, resetStats, takeInternal
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FilterServiceLockFine

public FilterServiceLockFine()
Method Detail

acquireWriteLock

public void acquireWriteLock()

releaseWriteLock

public void releaseWriteLock()

take

public FilterSet take(java.util.Set<java.lang.String> statementId)
Description copied from interface: FilterServiceSPI
Take a set of statements of out the active filters, returning a save-set of filters.

Parameters:
statementId - statement ids to remove
Returns:
filters

apply

public void apply(FilterSet filterSet)
Description copied from interface: FilterServiceSPI
Apply a set of previously taken filters.

Parameters:
filterSet - to apply

evaluate

public long evaluate(EventBean theEvent,
                     java.util.Collection<FilterHandle> matches)
Description copied from interface: FilterService
Finds matching filters to the event passed in and collects their associated callback method.

Parameters:
theEvent - is the event to be matched against filters
matches - is a collection that is populated via add method with any handles for matching filters
Returns:
filter current version

evaluate

public long evaluate(EventBean theEvent,
                     java.util.Collection<FilterHandle> matches,
                     java.lang.String statementId)
Description copied from interface: FilterService
Finds matching filters to the event passed in and collects their associated callback method, for a particular statement only

Parameters:
theEvent - is the event to be matched against filters
matches - is a collection that is populated via add method with any handles for matching filters
statementId - statement for which to return results for
Returns:
filter current version

add

public void add(FilterValueSet filterValueSet,
                FilterHandle callback)
Description copied from interface: FilterService
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

public void remove(FilterHandle callback)
Description copied from interface: FilterService
Remove a filter callback.

Parameters:
callback - is the callback to be removed

removeType

public void removeType(EventType type)

© 2006-2015 EsperTech Inc.
All rights reserved.
Visit us at espertech.com