com.espertech.esper.pattern.guard
Class TimerWithinOrMaxCountGuardFactory

java.lang.Object
  extended by com.espertech.esper.pattern.guard.TimerWithinOrMaxCountGuardFactory
All Implemented Interfaces:
GuardFactory, MetaDefItem, java.io.Serializable

public class TimerWithinOrMaxCountGuardFactory
extends java.lang.Object
implements GuardFactory, MetaDefItem, java.io.Serializable

See Also:
Serialized Form

Field Summary
protected  MatchedEventConvertor convertor
          For converting matched-events maps to events-per-stream.
protected  ExprNode millisecondsExpr
          Number of milliseconds.
protected  ExprNode numCountToExpr
          Number of count-to max.
 
Constructor Summary
TimerWithinOrMaxCountGuardFactory()
           
 
Method Summary
protected  long computeMilliseconds(MatchedEventMap beginState, PatternAgentInstanceContext context)
           
protected  int computeNumCountTo(MatchedEventMap beginState, PatternAgentInstanceContext context)
           
 Guard makeGuard(PatternAgentInstanceContext context, MatchedEventMap beginState, Quitable quitable, EvalStateNodeNumber stateNodeId, java.lang.Object guardState)
          Constructs a guard instance.
 void setGuardParameters(java.util.List<ExprNode> parameters, MatchedEventConvertor convertor)
          Sets the guard object parameters.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

millisecondsExpr

protected ExprNode millisecondsExpr
Number of milliseconds.


numCountToExpr

protected ExprNode numCountToExpr
Number of count-to max.


convertor

protected transient MatchedEventConvertor convertor
For converting matched-events maps to events-per-stream.

Constructor Detail

TimerWithinOrMaxCountGuardFactory

public TimerWithinOrMaxCountGuardFactory()
Method Detail

setGuardParameters

public void setGuardParameters(java.util.List<ExprNode> parameters,
                               MatchedEventConvertor convertor)
                        throws GuardParameterException
Description copied from interface: GuardFactory
Sets the guard object parameters.

Specified by:
setGuardParameters in interface GuardFactory
Parameters:
parameters - is a list of parameters
convertor - for converting a
Throws:
GuardParameterException - thrown to indicate a parameter problem

computeMilliseconds

protected long computeMilliseconds(MatchedEventMap beginState,
                                   PatternAgentInstanceContext context)

computeNumCountTo

protected int computeNumCountTo(MatchedEventMap beginState,
                                PatternAgentInstanceContext context)

makeGuard

public Guard makeGuard(PatternAgentInstanceContext context,
                       MatchedEventMap beginState,
                       Quitable quitable,
                       EvalStateNodeNumber stateNodeId,
                       java.lang.Object guardState)
Description copied from interface: GuardFactory
Constructs a guard instance.

Specified by:
makeGuard in interface GuardFactory
Parameters:
context - - services for use by guard
beginState - - the prior matching events
quitable - - to use for indicating the guard has quit
stateNodeId - - a node id for the state object
guardState - - state node for guard
Returns:
guard instance

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