Beispiel #1
0
 public override EventBean[] ProcessInsert(FAFQueryMethodIUDInsertInto insert)
 {
     TableEvalLockUtil.ObtainLockUnless(
         instance.TableLevelRWLock.WriteLock,
         instance.AgentInstanceContext.TableExprEvaluatorContext);
     var theEvent = insert.InsertHelper.Process(new EventBean[0], true, true, instance.AgentInstanceContext);
     var aggs = instance.Table.AggregationRowFactory.Make();
     ((object[]) theEvent.Underlying)[0] = aggs;
     instance.AddEvent(theEvent);
     return CollectionUtil.EVENTBEANARRAY_EMPTY;
 }
Beispiel #2
0
        public override EventBean[] ProcessInsert(FAFQueryMethodIUDInsertInto insert)
        {
            AgentInstanceContext ctx = ProcessorInstance.TailViewInstance.AgentInstanceContext;
            try {
                var @event = insert.InsertHelper.Process(new EventBean[0], true, true, ctx);
                EventBean[] inserted = {@event};

                using (ctx.AgentInstanceLock.AcquireWriteLock()) {
                    try {
                        ProcessorInstance.RootViewInstance.Update(inserted, null);
                    }
                    catch (EPException) {
                        ProcessorInstance.RootViewInstance.Update(null, inserted);
                    }
                }

                return inserted;
            }
            finally {
                ctx.TableExprEvaluatorContext.ReleaseAcquiredLocks();
            }
        }
Beispiel #3
0
 public abstract EventBean[] ProcessInsert(FAFQueryMethodIUDInsertInto insert);