Class EvalObserverStateNode
java.lang.Object
com.espertech.esper.common.internal.epl.pattern.core.EvalStateNode
com.espertech.esper.common.internal.epl.pattern.observer.EvalObserverStateNode
- All Implemented Interfaces:
ObserverEventEvaluator
This class represents the state of an eventObserver sub-expression in the evaluation state tree.
-
Field Summary
-
Constructor Summary
ConstructorDescriptionEvalObserverStateNode
(Evaluator parentNode, EvalObserverNode evalObserverNode) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionfinal void
accept
(EvalStateNodeVisitor visitor) Accept a visitor.Returns the factory node for the state node.boolean
boolean
boolean
void
observerEvaluateFalse
(boolean restartable) Indicate that the observer turned permanently false.void
observerEvaluateTrue
(MatchedEventMap matchEvent, boolean quitted) Indicate an event for evaluation (sub-expression the observer represents has turned true).final void
quit()
Stops the event expression or an instance of it.void
removeMatch
(Set<EventBean> matchEvent) Remove matches that overlap with the provided events.void
start
(MatchedEventMap beginState) Starts the event expression or an instance of it.final String
toString()
Methods inherited from class com.espertech.esper.common.internal.epl.pattern.core.EvalStateNode
getParentEvaluator, setParentEvaluator, transfer
-
Field Details
-
evalObserverNode
-
eventObserver
-
-
Constructor Details
-
EvalObserverStateNode
Constructor.- Parameters:
parentNode
- is the parent evaluator to call to indicate truth valueevalObserverNode
- is the factory node associated to the state
-
-
Method Details
-
removeMatch
Description copied from class:EvalStateNode
Remove matches that overlap with the provided events.- Specified by:
removeMatch
in classEvalStateNode
- Parameters:
matchEvent
- set of events to check for
-
getFactoryNode
Description copied from class:EvalStateNode
Returns the factory node for the state node.- Specified by:
getFactoryNode
in classEvalStateNode
- Returns:
- factory node
-
getContext
- Specified by:
getContext
in interfaceObserverEventEvaluator
-
observerEvaluateTrue
Description copied from interface:ObserverEventEvaluator
Indicate an event for evaluation (sub-expression the observer represents has turned true).- Specified by:
observerEvaluateTrue
in interfaceObserverEventEvaluator
- Parameters:
matchEvent
- is the matched events so farquitted
- whether the observer quit, usually "true" for most observers
-
observerEvaluateFalse
public void observerEvaluateFalse(boolean restartable) Description copied from interface:ObserverEventEvaluator
Indicate that the observer turned permanently false.- Specified by:
observerEvaluateFalse
in interfaceObserverEventEvaluator
- Parameters:
restartable
- true for whether it can restart
-
start
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 classEvalStateNode
- Parameters:
beginState
- begin state
-
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 classEvalStateNode
-
accept
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 classEvalStateNode
- Parameters:
visitor
- on which the visit method is invoked by each node
-
isNotOperator
public boolean isNotOperator()- Specified by:
isNotOperator
in classEvalStateNode
-
isFilterStateNode
public boolean isFilterStateNode()- Specified by:
isFilterStateNode
in classEvalStateNode
-
isObserverStateNodeNonRestarting
public boolean isObserverStateNodeNonRestarting()- Specified by:
isObserverStateNodeNonRestarting
in classEvalStateNode
-
toString
-