public FlushedEventBuffer GetAndResetOldEventBuffer() { FlushedEventBuffer buf = oldEventBuffer; oldEventBuffer = null; return(buf); }
/// <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); }
public FlushedEventBuffer GetAndResetNewEventBuffer() { FlushedEventBuffer buf = newEventBuffer; newEventBuffer = null; return(buf); }
private static EventBean[] GetBufferData(FlushedEventBuffer buffer) { if (buffer == null) { return(null); } return(buffer.GetAndFlush()); }
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); }
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)); } }
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; }
/// <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; }
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(); }