com.espertech.esper.pattern.guard
Class ExpressionGuard

java.lang.Object
  extended by com.espertech.esper.pattern.guard.ExpressionGuard
All Implemented Interfaces:
Guard

public class ExpressionGuard
extends java.lang.Object
implements Guard

Guard implementation that keeps a timer instance and quits when the timer expired, and also keeps a count of the number of matches so far, checking both count and timer, letting all MatchedEventMap instances pass until then.


Constructor Summary
ExpressionGuard(MatchedEventConvertor convertor, ExprEvaluator expression, Quitable quitable)
          Ctor.
 
Method Summary
 void accept(EventGuardVisitor visitor)
           
 boolean inspect(MatchedEventMap matchEvent)
          Returns true if inspection shows that the match events can pass, or false to not pass.
 void startGuard()
          Start the guard operation.
 void stopGuard()
          Called when sub-expression quits, or when the pattern stopped.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExpressionGuard

public ExpressionGuard(MatchedEventConvertor convertor,
                       ExprEvaluator expression,
                       Quitable quitable)
Ctor.

Parameters:
quitable - - to use to indicate that the gaurd quitted
Method Detail

startGuard

public void startGuard()
Description copied from interface: Guard
Start the guard operation.

Specified by:
startGuard in interface Guard

inspect

public boolean inspect(MatchedEventMap matchEvent)
Description copied from interface: Guard
Returns true if inspection shows that the match events can pass, or false to not pass.

Specified by:
inspect in interface Guard
Parameters:
matchEvent - is the map of matching events
Returns:
true to pass, false to not pass

stopGuard

public void stopGuard()
Description copied from interface: Guard
Called when sub-expression quits, or when the pattern stopped.

Specified by:
stopGuard in interface Guard

accept

public void accept(EventGuardVisitor visitor)
Specified by:
accept in interface Guard

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