Esempio n. 1
0
        public override void Update(
            EventBean[] newData,
            EventBean[] oldData)
        {
            agentInstanceContext.AuditProvider.View(newData, oldData, agentInstanceContext, factory);
            agentInstanceContext.InstrumentationProvider.QViewProcessIRStream(factory, newData, oldData);

            // add data points to the window
            if (newData != null) {
                foreach (var newEvent in newData) {
                    var pair = new ExpressionWindowTimestampEventPair(agentInstanceContext.TimeProvider.Time, newEvent);
                    window.Add(pair);
                    InternalHandleAdd(pair);
                }

                aggregationService?.ApplyEnter(newData, null, agentInstanceContext);
            }

            if (oldData != null) {
                window.RemoveWhere(
                    pair => oldData.Any(anOldData => pair.TheEvent == anOldData),
                    InternalHandleRemoved);

                aggregationService?.ApplyLeave(oldData, null, agentInstanceContext);
            }

            // expire events
            Expire(newData, oldData);
            agentInstanceContext.InstrumentationProvider.AViewProcessIRStream();
        }
Esempio n. 2
0
 private bool CheckEvent(
     ExpressionWindowTimestampEventPair first,
     ExpressionWindowTimestampEventPair newest,
     int numExpired)
 {
     ExpressionViewOAFieldEnumExtensions.Populate(
         builtinEventProps.Properties,
         window.Count,
         first.Timestamp,
         newest.Timestamp,
         this,
         numExpired,
         first.TheEvent,
         newest.TheEvent);
     eventsPerStream[0] = first.TheEvent;
     return ExpressionBatchViewUtil.Evaluate(eventsPerStream, agentInstanceContext, factory, aggregationService);
 }
Esempio n. 3
0
 public void InternalHandleAdd(ExpressionWindowTimestampEventPair pair)
 {
     // no action required
 }