예제 #1
0
        public View MakeView(AgentInstanceViewFactoryChainContext agentInstanceViewFactoryContext)
        {
            int sortWindowSize = ViewFactorySupport.EvaluateSizeParam(ViewName, _sizeEvaluator, agentInstanceViewFactoryContext.AgentInstanceContext);
            IStreamSortRankRandomAccess rankedRandomAccess = agentInstanceViewFactoryContext.StatementContext.ViewServicePreviousFactory.GetOptPreviousExprSortedRankedAccess(agentInstanceViewFactoryContext);

            return(new RankWindowView(this, _uniqueCriteriaExpressions, _uniqueEvals, _sortCriteriaExpressions, _sortEvals, _isDescendingValues, sortWindowSize, rankedRandomAccess, _useCollatorSort, agentInstanceViewFactoryContext));
        }
예제 #2
0
        public bool CanReuse(View view, AgentInstanceContext agentInstanceContext)
        {
            if (!(view is FirstLengthWindowView))
            {
                return false;
            }

            var myView = (FirstLengthWindowView) view;
            int size = ViewFactorySupport.EvaluateSizeParam(ViewName, _sizeEvaluator, agentInstanceContext);
            return myView.Size == size && myView.IsEmpty();
        }
예제 #3
0
        public View MakeView(AgentInstanceViewFactoryChainContext agentInstanceViewFactoryContext)
        {
            var timeDeltaComputation = timeDeltaComputationFactory.Make(
                ViewName, "view", agentInstanceViewFactoryContext.AgentInstanceContext);
            var size = ViewFactorySupport.EvaluateSizeParam(
                ViewName, _sizeEvaluator, agentInstanceViewFactoryContext.AgentInstanceContext);
            var viewUpdatedCollection =
                agentInstanceViewFactoryContext.StatementContext.ViewServicePreviousFactory
                .GetOptPreviousExprRelativeAccess(agentInstanceViewFactoryContext);

            return(new TimeLengthBatchView(
                       this, agentInstanceViewFactoryContext, timeDeltaComputation, size, IsForceUpdate, IsStartEager,
                       viewUpdatedCollection));
        }
예제 #4
0
 public View MakeView(AgentInstanceViewFactoryChainContext agentInstanceViewFactoryContext)
 {
     int size = ViewFactorySupport.EvaluateSizeParam(
         ViewName, _sizeEvaluator, agentInstanceViewFactoryContext.AgentInstanceContext);
     ViewUpdatedCollection viewUpdatedCollection =
         agentInstanceViewFactoryContext.StatementContext.ViewServicePreviousFactory
             .GetOptPreviousExprRelativeAccess(agentInstanceViewFactoryContext);
     if (agentInstanceViewFactoryContext.IsRemoveStream)
     {
         return new LengthBatchViewRStream(agentInstanceViewFactoryContext, this, size);
     }
     else
     {
         return new LengthBatchView(agentInstanceViewFactoryContext, this, size, viewUpdatedCollection);
     }
 }
예제 #5
0
        public bool CanReuse(View view, AgentInstanceContext agentInstanceContext)
        {
            if (!(view is SortWindowView))
            {
                return(false);
            }

            SortWindowView other          = (SortWindowView)view;
            int            sortWindowSize = ViewFactorySupport.EvaluateSizeParam(ViewName, _sizeEvaluator, agentInstanceContext);

            if ((other.SortWindowSize != sortWindowSize) ||
                (!Compare(other.IsDescendingValues, _isDescendingValues)) ||
                (!ExprNodeUtility.DeepEquals(other.SortCriteriaExpressions, _sortCriteriaExpressions)))
            {
                return(false);
            }

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

            var myView = (TimeLengthBatchView)view;
            var timeDeltaComputation = timeDeltaComputationFactory.Make(
                ViewName, "view", agentInstanceContext);

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

            var size = ViewFactorySupport.EvaluateSizeParam(ViewName, _sizeEvaluator, agentInstanceContext);

            if (myView.NumberOfEvents != size)
            {
                return(false);
            }

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

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

            return(myView.IsEmpty());
        }
예제 #7
0
 public View MakeView(AgentInstanceViewFactoryChainContext agentInstanceViewFactoryContext)
 {
     int size = ViewFactorySupport.EvaluateSizeParam(
         ViewName, _sizeEvaluator, agentInstanceViewFactoryContext.AgentInstanceContext);
     return new FirstLengthWindowView(agentInstanceViewFactoryContext, this, size);
 }