示例#1
0
        public TimeOrderView(
            AgentInstanceViewFactoryChainContext agentInstanceContext,
            TimeOrderViewFactory factory,
            IStreamSortRankRandomAccess optionalSortedRandomAccess,
            TimePeriodProvide timePeriodProvide)
        {
            this.agentInstanceContext = agentInstanceContext.AgentInstanceContext;
            this.factory = factory;
            this.optionalSortedRandomAccess = optionalSortedRandomAccess;
            scheduleSlot = agentInstanceContext.StatementContext.ScheduleBucket.AllocateSlot();
            this.timePeriodProvide = timePeriodProvide;

            sortedEvents = new OrderedListDictionary<object, object>();

            ScheduleHandleCallback callback = new ProxyScheduleHandleCallback {
                ProcScheduledTrigger = () => {
                    agentInstanceContext.AuditProvider.ScheduleFire(
                        agentInstanceContext.AgentInstanceContext,
                        ScheduleObjectType.view,
                        factory.ViewName);
                    agentInstanceContext.InstrumentationProvider.QViewScheduledEval(factory);
                    Expire();
                    agentInstanceContext.InstrumentationProvider.AViewScheduledEval();
                }
            };
            handle = new EPStatementHandleCallbackSchedule(
                agentInstanceContext.EpStatementAgentInstanceHandle,
                callback);
        }
示例#2
0
        public TimeAccumView(
            TimeAccumViewFactory timeBatchViewFactory,
            AgentInstanceViewFactoryChainContext agentInstanceContext,
            ViewUpdatedCollection viewUpdatedCollection,
            TimePeriodProvide timePeriodProvide)
        {
            this.agentInstanceContext = agentInstanceContext.AgentInstanceContext;
            factory = timeBatchViewFactory;
            this.viewUpdatedCollection = viewUpdatedCollection;
            scheduleSlot = agentInstanceContext.StatementContext.ScheduleBucket.AllocateSlot();
            this.timePeriodProvide = timePeriodProvide;

            ScheduleHandleCallback callback = new ProxyScheduleHandleCallback {
                ProcScheduledTrigger = () => {
                    agentInstanceContext.AuditProvider.ScheduleFire(
                        agentInstanceContext.AgentInstanceContext,
                        ScheduleObjectType.view,
                        factory.ViewName);
                    agentInstanceContext.InstrumentationProvider.QViewScheduledEval(factory);
                    SendRemoveStream();
                    agentInstanceContext.InstrumentationProvider.AViewScheduledEval();
                }
            };
            handle = new EPStatementHandleCallbackSchedule(
                agentInstanceContext.EpStatementAgentInstanceHandle,
                callback);
        }
示例#3
0
        public TimeAccumViewRStream(
            TimeAccumViewFactory timeBatchViewFactory,
            AgentInstanceViewFactoryChainContext agentInstanceContext,
            TimePeriodProvide timePeriodProvide)
        {
            _agentInstanceContext = agentInstanceContext.AgentInstanceContext;
            _factory = timeBatchViewFactory;
            _scheduleSlot = agentInstanceContext.StatementContext.ScheduleBucket.AllocateSlot();
            _timePeriodProvide = timePeriodProvide;

            ScheduleHandleCallback callback = new ProxyScheduleHandleCallback() {
                ProcScheduledTrigger = () => {
                    agentInstanceContext.AuditProvider.ScheduleFire(
                        agentInstanceContext.AgentInstanceContext,
                        ScheduleObjectType.view,
                        _factory.ViewName);
                    agentInstanceContext.InstrumentationProvider.QViewScheduledEval(_factory);
                    SendRemoveStream();
                    agentInstanceContext.InstrumentationProvider.AViewScheduledEval();
                },
            };
            _handle = new EPStatementHandleCallbackSchedule(
                agentInstanceContext.EpStatementAgentInstanceHandle,
                callback);
        }
示例#4
0
 public ExternallyTimedWindowView(
     ExternallyTimedWindowViewFactory factory,
     ViewUpdatedCollection viewUpdatedCollection,
     AgentInstanceViewFactoryChainContext agentInstanceViewFactoryContext,
     TimePeriodProvide timePeriodProvide)
 {
     this.factory = factory;
     this.viewUpdatedCollection = viewUpdatedCollection;
     this.timeWindow = new TimeWindow(agentInstanceViewFactoryContext.IsRemoveStream);
     this.agentInstanceViewFactoryContext = agentInstanceViewFactoryContext;
     this.timePeriodProvide = timePeriodProvide;
 }
 public ExternallyTimedBatchView(
     ExternallyTimedBatchViewFactory factory,
     ViewUpdatedCollection viewUpdatedCollection,
     AgentInstanceViewFactoryChainContext agentInstanceContext,
     TimePeriodProvide timePeriodProvide)
 {
     this.factory = factory;
     this.viewUpdatedCollection = viewUpdatedCollection;
     this.agentInstanceContext = agentInstanceContext.AgentInstanceContext;
     referenceTimestamp = factory.optionalReferencePoint;
     this.timePeriodProvide = timePeriodProvide;
 }
示例#6
0
        public FirstTimeView(
            FirstTimeViewFactory factory,
            AgentInstanceViewFactoryChainContext agentInstanceContext,
            TimePeriodProvide timePeriodProvide)
        {
            this.agentInstanceContext = agentInstanceContext.AgentInstanceContext;
            this.factory = factory;
            scheduleSlot = agentInstanceContext.StatementContext.ScheduleBucket.AllocateSlot();
            this.timePeriodProvide = timePeriodProvide;

            ScheduleCallback();
        }
示例#7
0
        public TimeBatchViewRStream(
            TimeBatchViewFactory factory,
            AgentInstanceViewFactoryChainContext agentInstanceContext,
            TimePeriodProvide timePeriodProvide)
        {
            this.agentInstanceContext = agentInstanceContext.AgentInstanceContext;
            this.factory = factory;
            scheduleSlot = agentInstanceContext.StatementContext.ScheduleBucket.AllocateSlot();
            this.timePeriodProvide = timePeriodProvide;

            // schedule the first callback
            if (factory.isStartEager) {
                currentReferencePoint = agentInstanceContext.StatementContext.SchedulingService.Time;
                ScheduleCallback();
                isCallbackScheduled = true;
            }
        }
示例#8
0
        public TimeLengthBatchView(
            TimeLengthBatchViewFactory factory,
            int size,
            AgentInstanceViewFactoryChainContext agentInstanceContext,
            ViewUpdatedCollection viewUpdatedCollection,
            TimePeriodProvide timePeriodProvide)
        {
            this.agentInstanceContext = agentInstanceContext.AgentInstanceContext;
            this.factory = factory;
            this.size = size;
            this.viewUpdatedCollection = viewUpdatedCollection;
            scheduleSlot = agentInstanceContext.StatementContext.ScheduleBucket.AllocateSlot();
            this.timePeriodProvide = timePeriodProvide;

            // schedule the first callback
            if (factory.IsStartEager) {
                ScheduleCallback(0);
            }
        }
示例#9
0
        public TimeBatchView(
            TimeBatchViewFactory factory,
            AgentInstanceViewFactoryChainContext agentInstanceContext,
            ViewUpdatedCollection viewUpdatedCollection,
            TimePeriodProvide timePeriodProvide)
        {
            _agentInstanceContext = agentInstanceContext.AgentInstanceContext;
            _factory = factory;
            _viewUpdatedCollection = viewUpdatedCollection;
            _scheduleSlot = agentInstanceContext.StatementContext.ScheduleBucket.AllocateSlot();
            _timePeriodProvide = timePeriodProvide;

            // schedule the first callback
            if (factory.isStartEager) {
                if (_currentReferencePoint == null) {
                    _currentReferencePoint = agentInstanceContext.StatementContext.SchedulingService.Time;
                }

                ScheduleCallback();
                _isCallbackScheduled = true;
            }
        }
示例#10
0
 public View MakeView(AgentInstanceViewFactoryChainContext agentInstanceViewFactoryContext)
 {
     TimePeriodProvide timePeriodProvide =
         timePeriodCompute.GetNonVariableProvide(agentInstanceViewFactoryContext.AgentInstanceContext);
     return new FirstTimeView(this, agentInstanceViewFactoryContext, timePeriodProvide);
 }