示例#1
0
        public FlushedEventBuffer GetAndResetOldEventBuffer()
        {
            FlushedEventBuffer buf = oldEventBuffer;

            oldEventBuffer = null;
            return(buf);
        }
示例#2
0
 /// <summary>
 /// Receive new and old events from a stream.
 /// </summary>
 /// <param name="streamId">the stream number sending the events</param>
 /// <param name="newEventBuffer">buffer for new events</param>
 /// <param name="oldEventBuffer">buffer for old events</param>
 public void NewData(
     int streamId,
     FlushedEventBuffer newEventBuffer,
     FlushedEventBuffer oldEventBuffer)
 {
     m_delegate(streamId, newEventBuffer, oldEventBuffer);
 }
示例#3
0
        public FlushedEventBuffer GetAndResetNewEventBuffer()
        {
            FlushedEventBuffer buf = newEventBuffer;

            newEventBuffer = null;
            return(buf);
        }
示例#4
0
 private static EventBean[] GetBufferData(FlushedEventBuffer buffer)
 {
     if (buffer == null)
     {
         return(null);
     }
     return(buffer.GetAndFlush());
 }
示例#5
0
 public void NewData(int streamId, FlushedEventBuffer newEventBuffer, FlushedEventBuffer oldEventBuffer)
 {
     EventBean[] newData = newEventBuffer.GetAndFlush();
     EventBean[] oldData = oldEventBuffer.GetAndFlush();
     foreach (EventTable table in _eventIndex)
     {
         table.AddRemove(newData, oldData);
     }
 }
 public void NewData(
     int streamId,
     FlushedEventBuffer newEventBuffer,
     FlushedEventBuffer oldEventBuffer)
 {
     hasNewData = true;
     newStreamBuffer.Put(streamId, newEventBuffer);
     oldStreamBuffer.Put(streamId, oldEventBuffer);
 }
示例#7
0
 public void NewData(
     int streamId,
     FlushedEventBuffer newEventBuffer,
     FlushedEventBuffer oldEventBuffer)
 {
     var newData = newEventBuffer.GetAndFlush();
     var oldData = oldEventBuffer.GetAndFlush();
     foreach (var table in eventIndex) {
         table.AddRemove(newData, oldData, agentInstanceContext);
     }
 }
        public void SetUp()
        {
            buffer = new FlushedEventBuffer();
            events = new EventBean[10];

            for (var i = 0; i < events.Length; i++)
            {
                events[i] = SupportEventBeanFactory.CreateObject(
                    supportEventTypeFactory, new SupportBean("a", i));
            }
        }
示例#9
0
        public void NewData(int streamId, FlushedEventBuffer newEventBuffer, FlushedEventBuffer oldEventBuffer)
        {
            if (hasNewData == true)
            {
                throw new IllegalStateException("Observer already has new data");
            }

            hasNewData          = true;
            this.streamId       = streamId;
            this.newEventBuffer = newEventBuffer;
            this.oldEventBuffer = oldEventBuffer;
        }
示例#10
0
 /// <summary>
 /// Ctor.
 /// </summary>
 /// <param name="filterList">is a list of filter expressions</param>
 /// <param name="optPropertyEvaluator">The opt property evaluator.</param>
 /// <param name="eventType">the event type of the named window</param>
 /// <param name="consumerCallback">The consumer callback.</param>
 /// <param name="exprEvaluatorContext">context for expression evalauation</param>
 /// <param name="audit">if set to <c>true</c> [audit].</param>
 public NamedWindowConsumerView(ExprEvaluator[] filterList,
                                PropertyEvaluator optPropertyEvaluator,
                                EventType eventType,
                                NamedWindowConsumerCallback consumerCallback,
                                ExprEvaluatorContext exprEvaluatorContext,
                                bool audit)
 {
     _filterList                 = filterList;
     _optPropertyEvaluator       = optPropertyEvaluator;
     _optPropertyContainedBuffer = optPropertyEvaluator != null ? new FlushedEventBuffer() : null;
     _eventType            = eventType;
     _consumerCallback     = consumerCallback;
     _exprEvaluatorContext = exprEvaluatorContext;
     _audit = audit;
 }
示例#11
0
        public NamedWindowConsumerView(
            int namedWindowConsumerId,
            ExprEvaluator filter,
            PropertyEvaluator optPropertyEvaluator,
            EventType eventType,
            NamedWindowConsumerCallback consumerCallback,
            ExprEvaluatorContext exprEvaluatorContext,
            bool audit)
        {
            NamedWindowConsumerId = namedWindowConsumerId;
            Filter = filter;
            this.optPropertyEvaluator = optPropertyEvaluator;
            if (optPropertyEvaluator != null) {
                optPropertyContainedBuffer = new FlushedEventBuffer();
            }
            else {
                optPropertyContainedBuffer = null;
            }

            this.eventType = eventType;
            ConsumerCallback = consumerCallback;
            this.exprEvaluatorContext = exprEvaluatorContext;
            this.audit = audit;
        }
 private static EventBean[] GetBufferData(FlushedEventBuffer buffer)
 {
     return buffer?.GetAndFlush();
 }