com.espertech.esper.filter
Class FilterServiceBase

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

public abstract class FilterServiceBase
extends java.lang.Object
implements FilterServiceSPI

Implementation of the filter service interface. Does not allow the same filter callback to be added more then once.


Constructor Summary
protected FilterServiceBase(FilterServiceGranularLockFactory lockFactory)
          Constructor.
 
Method Summary
 void addFilterServiceListener(FilterServiceListener filterServiceListener)
          Add activity listener.void acquireWriteLock();
protected  void addInternal(FilterValueSet filterValueSet, FilterHandle filterCallback)
           
protected  void applyInternal(FilterSet filterSet)
           
 void destroy()
          Destroy the service.
protected  long evaluateInternal(EventBean theEvent, java.util.Collection<FilterHandle> matches)
           
protected  long evaluateInternal(EventBean theEvent, java.util.Collection<FilterHandle> matches, java.lang.String statementId)
           
 int getCountTypes()
           
 int getFilterCountApprox()
           
 long getFiltersVersion()
          Returns filter version.
 long getNumEventsEvaluated()
          Return a count of the number of events evaluated by this service.
 void removeFilterServiceListener(FilterServiceListener filterServiceListener)
          Remove activity listener.
protected  void removeInternal(FilterHandle filterCallback)
           
protected  void removeTypeInternal(EventType type)
           
 void resetStats()
          Reset the number of events evaluated
protected  FilterSet takeInternal(java.util.Set<java.lang.String> statementIds)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.espertech.esper.filter.FilterServiceSPI
acquireWriteLock, apply, releaseWriteLock, take
 
Methods inherited from interface com.espertech.esper.filter.FilterService
add, evaluate, evaluate, remove, removeType
 

Constructor Detail

FilterServiceBase

protected FilterServiceBase(FilterServiceGranularLockFactory lockFactory)
Constructor.

Method Detail

getFiltersVersion

public long getFiltersVersion()
Description copied from interface: FilterService
Returns filter version.

Specified by:
getFiltersVersion in interface FilterService
Returns:
filter version

destroy

public void destroy()
Description copied from interface: FilterService
Destroy the service.

Specified by:
destroy in interface FilterService

addInternal

protected void addInternal(FilterValueSet filterValueSet,
                           FilterHandle filterCallback)

removeInternal

protected void removeInternal(FilterHandle filterCallback)

evaluateInternal

protected long evaluateInternal(EventBean theEvent,
                                java.util.Collection<FilterHandle> matches)

evaluateInternal

protected long evaluateInternal(EventBean theEvent,
                                java.util.Collection<FilterHandle> matches,
                                java.lang.String statementId)

getNumEventsEvaluated

public final long getNumEventsEvaluated()
Description copied from interface: FilterService
Return a count of the number of events evaluated by this service.

Specified by:
getNumEventsEvaluated in interface FilterService
Returns:
count of invocations of evaluate method

resetStats

public void resetStats()
Description copied from interface: FilterService
Reset the number of events evaluated

Specified by:
resetStats in interface FilterService

addFilterServiceListener

public void addFilterServiceListener(FilterServiceListener filterServiceListener)
Description copied from interface: FilterServiceSPI
Add activity listener.void acquireWriteLock();

Specified by:
addFilterServiceListener in interface FilterServiceSPI
Parameters:
filterServiceListener - to add

removeFilterServiceListener

public void removeFilterServiceListener(FilterServiceListener filterServiceListener)
Description copied from interface: FilterServiceSPI
Remove activity listener.

Specified by:
removeFilterServiceListener in interface FilterServiceSPI
Parameters:
filterServiceListener - to remove

takeInternal

protected FilterSet takeInternal(java.util.Set<java.lang.String> statementIds)

applyInternal

protected void applyInternal(FilterSet filterSet)

getFilterCountApprox

public int getFilterCountApprox()
Specified by:
getFilterCountApprox in interface FilterServiceSPI

getCountTypes

public int getCountTypes()
Specified by:
getCountTypes in interface FilterServiceSPI

removeTypeInternal

protected void removeTypeInternal(EventType type)

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