Exemplo n.º 1
0
        public override void Update(
            EventBean[] newData,
            EventBean[] oldData)
        {
            agentInstanceContext.InstrumentationProvider.QInfraOnAction(
                OnTriggerType.ON_MERGE,
                newData,
                CollectionUtil.EVENTBEANARRAY_EMPTY);

            if (newData == null) {
                agentInstanceContext.InstrumentationProvider.AInfraOnAction();
                return;
            }

            var newColl = new OneEventCollection();
            var eventsPerStream =
                new EventBean[3]; // first:named window, second: trigger, third:before-update (optional)

            foreach (var trigger in newData) {
                eventsPerStream[1] = trigger;
                factory.OnMergeHelper.InsertUnmatched.Apply(null, eventsPerStream, newColl, null, agentInstanceContext);
                OnExprViewNamedWindowMerge.ApplyDelta(newColl, null, factory, rootView, agentInstanceContext, this);
                newColl.Clear();
            }

            agentInstanceContext.InstrumentationProvider.AInfraOnAction();
        }
Exemplo n.º 2
0
        public override InfraOnExprBaseViewResult MakeNamedWindow(
            SubordWMatchExprLookupStrategy lookupStrategy,
            NamedWindowRootViewInstance namedWindowRootViewInstance,
            AgentInstanceContext agentInstanceContext)
        {
            View view;
            if (OnMergeHelper.InsertUnmatched != null) {
                view = new OnExprViewNamedWindowMergeInsertUnmatched(
                    namedWindowRootViewInstance,
                    agentInstanceContext,
                    this);
            }
            else {
                view = new OnExprViewNamedWindowMerge(
                    lookupStrategy,
                    namedWindowRootViewInstance,
                    agentInstanceContext,
                    this);
            }

            return new InfraOnExprBaseViewResult(view, null);
        }