public static EvalMatchUntilStateBounds InitBounds( EvalMatchUntilFactoryNode factoryNode, MatchedEventMap beginState, PatternAgentInstanceContext context) { int?lowerbounds = null; int?upperbounds = null; var eventsPerStream = factoryNode.Convertor.Convert(beginState); var evaluateParams = new EvaluateParams(eventsPerStream, true, context.AgentInstanceContext); if (factoryNode.SingleBound != null) { var bounds = (int?)factoryNode.SingleBound.ExprEvaluator.Evaluate(evaluateParams); lowerbounds = bounds; upperbounds = bounds; } else { if (factoryNode.LowerBounds != null) { lowerbounds = (int?)factoryNode.LowerBounds.ExprEvaluator.Evaluate(evaluateParams); } if (factoryNode.UpperBounds != null) { upperbounds = (int?)factoryNode.UpperBounds.ExprEvaluator.Evaluate(evaluateParams); } if (upperbounds != null && lowerbounds != null) { if (upperbounds < lowerbounds) { int?lbounds = lowerbounds; lowerbounds = upperbounds; upperbounds = lbounds; } } } return(new EvalMatchUntilStateBounds(lowerbounds, upperbounds)); }
public override EvalNode MakeEvalNode(PatternAgentInstanceContext agentInstanceContext, EvalNode parentNode) { EvalNode child = EvalNodeUtil.MakeEvalNodeSingleChild(ChildNodes, agentInstanceContext, parentNode); return(new EvalEveryNode(agentInstanceContext, this, child)); }
public override EvalNode MakeEvalNode(PatternAgentInstanceContext agentInstanceContext, EvalNode parentNode) { EvalNode[] children = EvalNodeUtil.MakeEvalNodeChildren(ChildNodes, agentInstanceContext, parentNode); return(new EvalMatchUntilNode(agentInstanceContext, this, children[0], children.Length == 1 ? null : children[1])); }
public EvalNotNode(PatternAgentInstanceContext context, EvalNotFactoryNode factoryNode, EvalNode childNode) : base(context) { _factoryNode = factoryNode; _childNode = childNode; }
public override EvalNode MakeEvalNode(PatternAgentInstanceContext agentInstanceContext, EvalNode parentNode) { EvalNode[] children = EvalNodeUtil.MakeEvalNodeChildren(ChildNodes, agentInstanceContext, parentNode); return(new EvalAndNode(agentInstanceContext, this, children)); }
public override EvalNode MakeEvalNode(PatternAgentInstanceContext agentInstanceContext, EvalNode parentNode) { return(new EvalFilterNode(agentInstanceContext, this)); }
public EvalEveryDistinctNode(EvalEveryDistinctFactoryNode factoryNode, EvalNode childNode, PatternAgentInstanceContext agentInstanceContext) : base(agentInstanceContext) { _factoryNode = factoryNode; _childNode = childNode; }
public static EvalNode[] MakeEvalNodeChildren(IList <EvalFactoryNode> childNodes, PatternAgentInstanceContext agentInstanceContext, EvalNode parentNode) { var children = new EvalNode[childNodes.Count]; for (int i = 0; i < childNodes.Count; i++) { children[i] = childNodes[i].MakeEvalNode(agentInstanceContext, parentNode); } return(children); }
public long AbsExpiry(PatternAgentInstanceContext context) { long current = context.StatementContext.SchedulingService.Time; return current + _timeDeltaComputation.DeltaAdd(current); }
public static EvalRootNode MakeRootNodeFromFactory(EvalRootFactoryNode rootFactoryNode, PatternAgentInstanceContext patternAgentInstanceContext) { return((EvalRootNode)rootFactoryNode.MakeEvalNode(patternAgentInstanceContext, null)); }
public static EvalNode MakeEvalNodeSingleChild(IList <EvalFactoryNode> childNodes, PatternAgentInstanceContext agentInstanceContext, EvalNode parentNode) { return(childNodes[0].MakeEvalNode(agentInstanceContext, parentNode)); }
public EvalAndNode(PatternAgentInstanceContext context, EvalAndFactoryNode factoryNode, IList <EvalNode> childNodes) : base(context) { FactoryNode = factoryNode; ChildNodes = childNodes; }
/// <summary> /// Initializes a new instance of the <see cref="EvalNodeBase"/> class. /// </summary> /// <param name="context">The context.</param> protected EvalNodeBase(PatternAgentInstanceContext context) { Context = context; }
public EvalFollowedByNode(PatternAgentInstanceContext context, EvalFollowedByFactoryNode factoryNode, IList <EvalNode> childNodes) : base(context) { _factoryNode = factoryNode; _childNodes = childNodes; }
public abstract EvalNode MakeEvalNode(PatternAgentInstanceContext agentInstanceContext, EvalNode parentNode);
public long AbsMillisecondExpiry(PatternAgentInstanceContext context) { long current = context.StatementContext.SchedulingService.Time; return(current + TimeDeltaComputation.DeltaMillisecondsAdd(current)); }