Beispiel #1
0
        public override void Apply(
            EventBean matchingEvent,
            EventBean[] eventsPerStream,
            TableInstance tableStateInstance,
            OnExprViewTableChangeHandler changeHandlerAdded,
            OnExprViewTableChangeHandler changeHandlerRemoved,
            AgentInstanceContext agentInstanceContext)
        {
            var theEvent = insertHelper.Process(eventsPerStream, true, true, agentInstanceContext);
            if (!route) {
                var aggs = tableStateInstance.Table.AggregationRowFactory.Make();
                ((Array) theEvent.Underlying).SetValue(aggs, 0);
                tableStateInstance.AddEvent(theEvent);
                changeHandlerAdded?.Add(theEvent, eventsPerStream, true, agentInstanceContext);

                return;
            }
            
            if (insertIntoTable != null) {
                var tableInstance = insertIntoTable.GetTableInstance(agentInstanceContext.AgentInstanceId);
                tableInstance.AddEventUnadorned(theEvent);
                return;
            }

            if (audit) {
                agentInstanceContext.AuditProvider.Insert(theEvent, agentInstanceContext);
            }

            agentInstanceContext.InternalEventRouter.Route(theEvent, agentInstanceContext, false);
        }
 public override void Apply(
     EventBean matchingEvent,
     EventBean[] eventsPerStream,
     TableInstance tableStateInstance,
     OnExprViewTableChangeHandler changeHandlerAdded,
     OnExprViewTableChangeHandler changeHandlerRemoved,
     AgentInstanceContext agentInstanceContext)
 {
     tableStateInstance.DeleteEvent(matchingEvent);
     changeHandlerRemoved?.Add(matchingEvent, eventsPerStream, false, agentInstanceContext);
 }
        public override void Apply(
            EventBean matchingEvent,
            EventBean[] eventsPerStream,
            TableInstance tableStateInstance,
            OnExprViewTableChangeHandler changeHandlerAdded,
            OnExprViewTableChangeHandler changeHandlerRemoved,
            AgentInstanceContext agentInstanceContext)
        {
            changeHandlerRemoved?.Add(matchingEvent, eventsPerStream, false, agentInstanceContext);

            tableUpdateStrategy.UpdateTable(
                Collections.SingletonList(matchingEvent),
                tableStateInstance,
                eventsPerStream,
                agentInstanceContext);
            changeHandlerAdded?.Add(matchingEvent, eventsPerStream, false, agentInstanceContext);
        }