com.espertech.esper.pattern
Class EvalFilterStateNode

java.lang.Object
  extended by com.espertech.esper.pattern.EvalStateNode
      extended by com.espertech.esper.pattern.EvalFilterStateNode
All Implemented Interfaces:
FilterHandle, FilterHandleCallback
Direct Known Subclasses:
EvalFilterStateNodeConsumeImpl

public class EvalFilterStateNode
extends EvalStateNode
implements FilterHandleCallback

This class contains the state of a single filter expression in the evaluation state tree.


Field Summary
protected  MatchedEventMap beginState
           
protected  EvalFilterNode evalFilterNode
           
protected  EPStatementHandleCallback handle
           
protected  boolean isStarted
           
 
Constructor Summary
EvalFilterStateNode(Evaluator parentNode, EvalFilterNode evalFilterNode)
          Constructor.
 
Method Summary
 void accept(EvalStateNodeVisitor visitor)
          Accept a visitor.
 EvalFilterNode getEvalFilterNode()
           
 EvalNode getFactoryNode()
          Returns the factory node for the state node.
 java.lang.String getStatementId()
          Returns the statement id.
 boolean isFilterStateNode()
           
 boolean isNotOperator()
           
 boolean isObserverStateNodeNonRestarting()
           
 boolean isSubSelect()
          Returns true if the filter applies to subselects.
 void matchFound(EventBean theEvent, java.util.Collection<FilterHandleCallback> allStmtMatches)
          Indicate that an event was evaluated by the FilterService which matches the filter specification FilterSpecCompiled associated with this callback.
 void quit()
          Stops the event expression or an instance of it.
 void removeMatch(java.util.Set<EventBean> matchEvent)
          Remove matches that overlap with the provided events.
 void start(MatchedEventMap beginState)
          Starts the event expression or an instance of it.
protected  void startFiltering()
           
 java.lang.String toString()
           
 
Methods inherited from class com.espertech.esper.pattern.EvalStateNode
getParentEvaluator, setParentEvaluator
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

evalFilterNode

protected final EvalFilterNode evalFilterNode

isStarted

protected boolean isStarted

handle

protected EPStatementHandleCallback handle

beginState

protected MatchedEventMap beginState
Constructor Detail

EvalFilterStateNode

public EvalFilterStateNode(Evaluator parentNode,
                           EvalFilterNode evalFilterNode)
Constructor.

Parameters:
parentNode - is the parent evaluator to call to indicate truth value
evalFilterNode - is the factory node associated to the state
Method Detail

getFactoryNode

public EvalNode getFactoryNode()
Description copied from class: EvalStateNode
Returns the factory node for the state node.

Specified by:
getFactoryNode in class EvalStateNode
Returns:
factory node

getStatementId

public java.lang.String getStatementId()
Description copied from interface: FilterHandle
Returns the statement id.

Specified by:
getStatementId in interface FilterHandle
Returns:
statement id

start

public final void start(MatchedEventMap beginState)
Description copied from class: EvalStateNode
Starts the event expression or an instance of it. Child classes are expected to initialize and start any event listeners or schedule any time-based callbacks as needed.

Specified by:
start in class EvalStateNode

quit

public final void quit()
Description copied from class: EvalStateNode
Stops the event expression or an instance of it. Child classes are expected to free resources and stop any event listeners or remove any time-based callbacks.

Specified by:
quit in class EvalStateNode

getEvalFilterNode

public EvalFilterNode getEvalFilterNode()

matchFound

public void matchFound(EventBean theEvent,
                       java.util.Collection<FilterHandleCallback> allStmtMatches)
Description copied from interface: FilterHandleCallback
Indicate that an event was evaluated by the FilterService which matches the filter specification FilterSpecCompiled associated with this callback.

Specified by:
matchFound in interface FilterHandleCallback
Parameters:
theEvent - - the event received that matches the filter specification

accept

public final void accept(EvalStateNodeVisitor visitor)
Description copied from class: EvalStateNode
Accept a visitor. Child classes are expected to invoke the visit method on the visitor instance passed in.

Specified by:
accept in class EvalStateNode
Parameters:
visitor - on which the visit method is invoked by each node

isSubSelect

public boolean isSubSelect()
Description copied from interface: FilterHandleCallback
Returns true if the filter applies to subselects.

Specified by:
isSubSelect in interface FilterHandleCallback
Returns:
subselect filter

toString

public final java.lang.String toString()
Overrides:
toString in class java.lang.Object

isFilterStateNode

public boolean isFilterStateNode()
Specified by:
isFilterStateNode in class EvalStateNode

isNotOperator

public boolean isNotOperator()
Specified by:
isNotOperator in class EvalStateNode

isObserverStateNodeNonRestarting

public boolean isObserverStateNodeNonRestarting()
Specified by:
isObserverStateNodeNonRestarting in class EvalStateNode

removeMatch

public void removeMatch(java.util.Set<EventBean> matchEvent)
Description copied from class: EvalStateNode
Remove matches that overlap with the provided events.

Specified by:
removeMatch in class EvalStateNode
Parameters:
matchEvent - set of events to check for

startFiltering

protected void startFiltering()

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