public class TimerWithinOrMaxCountGuardFactory extends Object implements GuardFactory, MetaDefItem, Serializable
Modifier and Type | Field and Description |
---|---|
protected MatchedEventConvertor |
convertor
For converting matched-events maps to events-per-stream.
|
protected ExprNode |
numCountToExpr
Number of count-to max.
|
protected ExprNode |
timeExpr
Number of milliseconds.
|
Constructor and Description |
---|
TimerWithinOrMaxCountGuardFactory() |
Modifier and Type | Method and Description |
---|---|
int |
computeNumCountTo(MatchedEventMap beginState,
PatternAgentInstanceContext context) |
long |
computeTime(MatchedEventMap beginState,
PatternAgentInstanceContext context) |
Guard |
makeGuard(PatternAgentInstanceContext context,
MatchedEventMap beginState,
Quitable quitable,
EvalStateNodeNumber stateNodeId,
Object guardState)
Constructs a guard instance.
|
void |
setGuardParameters(List<ExprNode> parameters,
MatchedEventConvertor convertor)
Sets the guard object parameters.
|
protected ExprNode timeExpr
protected ExprNode numCountToExpr
protected transient MatchedEventConvertor convertor
public void setGuardParameters(List<ExprNode> parameters, MatchedEventConvertor convertor) throws GuardParameterException
GuardFactory
setGuardParameters
in interface GuardFactory
parameters
- is a list of parametersconvertor
- for converting aGuardParameterException
- thrown to indicate a parameter problempublic long computeTime(MatchedEventMap beginState, PatternAgentInstanceContext context)
public int computeNumCountTo(MatchedEventMap beginState, PatternAgentInstanceContext context)
public Guard makeGuard(PatternAgentInstanceContext context, MatchedEventMap beginState, Quitable quitable, EvalStateNodeNumber stateNodeId, Object guardState)
GuardFactory
makeGuard
in interface GuardFactory
context
- - services for use by guardbeginState
- - the prior matching eventsquitable
- - to use for indicating the guard has quitstateNodeId
- - a node id for the state objectguardState
- - state node for guard