示例#1
0
        public bool CanReuse(View view)
        {
            if (!(view is ExternallyTimedWindowView))
            {
                return(false);
            }

            var myView = (ExternallyTimedWindowView)view;

            if ((!TimeDeltaComputation.EqualsTimePeriod(myView.TimeDeltaComputation)) ||
                (!ExprNodeUtility.DeepEquals(myView.TimestampExpression, TimestampExpression)))
            {
                return(false);
            }
            return(myView.IsEmpty());
        }
示例#2
0
        public bool CanReuse(View view)
        {
            if (!(view is TimeAccumView))
            {
                return(false);
            }

            var myView = (TimeAccumView)view;

            if (!_timeDeltaComputation.EqualsTimePeriod(myView.TimeDeltaComputation))
            {
                return(false);
            }

            return(myView.IsEmpty());
        }
示例#3
0
        public bool CanReuse(View view, AgentInstanceContext agentInstanceContext)
        {
            if (!(view is FirstTimeView))
            {
                return false;
            }

            var myView = (FirstTimeView) view;
            ExprTimePeriodEvalDeltaConst delta = _timeDeltaComputationFactory.Make(
                ViewName, "view", agentInstanceContext);
            if (!delta.EqualsTimePeriod(myView.TimeDeltaComputation))
            {
                return false;
            }
            return myView.IsEmpty();
        }
示例#4
0
        public bool CanReuse(View view)
        {
            if (!(view is TimeWindowView))
            {
                return(false);
            }

            var myView = (TimeWindowView)view;

            if (!_timeDeltaComputation.EqualsTimePeriod(myView.TimeDeltaComputation))
            {
                return(false);
            }

            // For reuse of the time window it doesn't matter if it provides random access or not
            return(myView.IsEmpty());
        }
示例#5
0
        public bool CanReuse(View view)
        {
            if (!(view is TimeOrderView))
            {
                return(false);
            }

            var other = (TimeOrderView)view;

            if ((!TimeDeltaComputation.EqualsTimePeriod(other.TimeDeltaComputation)) ||
                (!ExprNodeUtility.DeepEquals(other.TimestampExpression, TimestampExpression)))
            {
                return(false);
            }

            return(other.IsEmpty());
        }
示例#6
0
        public bool CanReuse(View view, AgentInstanceContext agentInstanceContext)
        {
            if (!(view is TimeAccumView))
            {
                return(false);
            }

            var myView = (TimeAccumView)view;
            ExprTimePeriodEvalDeltaConst timeDeltaComputation = _timeDeltaComputationFactory.Make(
                ViewName, "view", agentInstanceContext);

            if (!timeDeltaComputation.EqualsTimePeriod(myView.TimeDeltaComputation))
            {
                return(false);
            }

            return(myView.IsEmpty);
        }
示例#7
0
        public bool CanReuse(View view, AgentInstanceContext agentInstanceContext)
        {
            if (!(view is TimeWindowView))
            {
                return false;
            }

            var myView = (TimeWindowView) view;
            ExprTimePeriodEvalDeltaConst delta = _timeDeltaComputationFactory.Make(
                ViewName, "view", agentInstanceContext);
            if (!delta.EqualsTimePeriod(myView.TimeDeltaComputation))
            {
                return false;
            }

            // For reuse of the time window it doesn't matter if it provides random access or not
            return myView.IsEmpty();
        }
示例#8
0
        public bool CanReuse(View view, AgentInstanceContext agentInstanceContext)
        {
            if (!(view is TimeBatchView))
            {
                return(false);
            }

            TimeBatchView myView = (TimeBatchView)view;
            ExprTimePeriodEvalDeltaConst timeDeltaComputation = timeDeltaComputationFactory.Make(
                ViewName, "view", agentInstanceContext);

            if (!timeDeltaComputation.EqualsTimePeriod(myView.TimeDeltaComputation))
            {
                return(false);
            }

            if ((myView.InitialReferencePoint != null) && (_optionalReferencePoint != null))
            {
                if (!myView.InitialReferencePoint.Equals(_optionalReferencePoint.Value))
                {
                    return(false);
                }
            }
            if (((myView.InitialReferencePoint == null) && (_optionalReferencePoint != null)) ||
                ((myView.InitialReferencePoint != null) && (_optionalReferencePoint == null)))
            {
                return(false);
            }

            if (myView.IsForceOutput != IsForceUpdate)
            {
                return(false);
            }

            if (myView.IsStartEager)
            {
                // since it's already started
                return(false);
            }

            return(myView.IsEmpty());
        }