public override EventBean[] ProcessInsert(EPPreparedExecuteIUDSingleStreamExecInsert insert)
        {
            EPPreparedExecuteTableHelper.AssignTableAccessStrategies(insert.Services, insert.OptionalTableNodes, _processorInstance.TailViewInstance.AgentInstanceContext);
            try {
                var @event   = insert.InsertHelper.Process(new EventBean[0], true, true, insert.ExprEvaluatorContext);
                var inserted = new EventBean[] { @event };

                var ctx    = _processorInstance.TailViewInstance.AgentInstanceContext;
                var ailock = ctx.AgentInstanceLock;
                using (ailock.AcquireWriteLock())
                {
                    try
                    {
                        _processorInstance.RootViewInstance.Update(inserted, null);
                    }
                    catch (EPException)
                    {
                        _processorInstance.RootViewInstance.Update(null, inserted);
                    }
                }

                return(inserted);
            }
            finally {
                insert.Services.TableService.TableExprEvaluatorContext.ReleaseAcquiredLocks();
            }
        }
Beispiel #2
0
        public override EventBean[] ProcessInsert(EPPreparedExecuteIUDSingleStreamExecInsert insert)
        {
            ExprTableEvalLockUtil.ObtainLockUnless(_instance.TableLevelRWLock.WriteLock, insert.Services.TableService.TableExprEvaluatorContext);
            var theEvent = insert.InsertHelper.Process(new EventBean[0], true, true, insert.ExprEvaluatorContext);
            var aggs     = _instance.TableMetadata.RowFactory.MakeAggs(insert.ExprEvaluatorContext.AgentInstanceId, null, null);

            ((object[])theEvent.Underlying)[0] = aggs;
            _instance.AddEvent(theEvent);
            return(CollectionUtil.EVENTBEANARRAY_EMPTY);
        }
Beispiel #3
0
 public abstract EventBean[] ProcessInsert(EPPreparedExecuteIUDSingleStreamExecInsert insert);