use of org.ballerinalang.siddhi.core.event.stream.StreamEvent in project ballerina by ballerina-lang.
the class MultiProcessStreamReceiver method receive.
@Override
public void receive(ComplexEvent complexEvent) {
ComplexEvent aComplexEvent = complexEvent;
while (aComplexEvent != null) {
synchronized (this) {
stabilizeStates();
for (int anEventSequence : eventSequence) {
StreamEventConverter aStreamEventConverter = streamEventConverters[anEventSequence];
StreamEventPool aStreamEventPool = streamEventPools[anEventSequence];
StreamEvent borrowedEvent = aStreamEventPool.borrowEvent();
aStreamEventConverter.convertComplexEvent(aComplexEvent, borrowedEvent);
process(anEventSequence, borrowedEvent);
}
}
aComplexEvent = aComplexEvent.getNext();
}
}
use of org.ballerinalang.siddhi.core.event.stream.StreamEvent in project ballerina by ballerina-lang.
the class MultiProcessStreamReceiver method receive.
@Override
public void receive(Event event) {
synchronized (this) {
stabilizeStates();
for (int anEventSequence : eventSequence) {
StreamEventConverter aStreamEventConverter = streamEventConverters[anEventSequence];
StreamEventPool aStreamEventPool = streamEventPools[anEventSequence];
StreamEvent borrowedEvent = aStreamEventPool.borrowEvent();
aStreamEventConverter.convertEvent(event, borrowedEvent);
process(anEventSequence, borrowedEvent);
}
}
}
use of org.ballerinalang.siddhi.core.event.stream.StreamEvent in project ballerina by ballerina-lang.
the class ProcessStreamReceiver method receive.
@Override
public void receive(Event event) {
if (event != null) {
StreamEvent borrowedEvent = streamEventPool.borrowEvent();
streamEventConverter.convertEvent(event, borrowedEvent);
if (siddhiDebugger != null) {
siddhiDebugger.checkBreakPoint(queryName, SiddhiDebugger.QueryTerminal.IN, borrowedEvent);
}
process(new ComplexEventChunk<StreamEvent>(borrowedEvent, borrowedEvent, this.batchProcessingAllowed));
}
}
use of org.ballerinalang.siddhi.core.event.stream.StreamEvent in project ballerina by ballerina-lang.
the class ProcessStreamReceiver method receive.
@Override
public void receive(long timestamp, Object[] data) {
StreamEvent borrowedEvent = streamEventPool.borrowEvent();
streamEventConverter.convertData(timestamp, data, borrowedEvent);
// Send to debugger
if (siddhiDebugger != null) {
siddhiDebugger.checkBreakPoint(queryName, SiddhiDebugger.QueryTerminal.IN, borrowedEvent);
}
process(new ComplexEventChunk<StreamEvent>(borrowedEvent, borrowedEvent, this.batchProcessingAllowed));
}
use of org.ballerinalang.siddhi.core.event.stream.StreamEvent in project ballerina by ballerina-lang.
the class ProcessStreamReceiver method receive.
@Override
public void receive(Event event, boolean endOfBatch) {
StreamEvent borrowedEvent = streamEventPool.borrowEvent();
streamEventConverter.convertEvent(event, borrowedEvent);
ComplexEventChunk<StreamEvent> streamEventChunk = null;
synchronized (this) {
batchingStreamEventChunk.add(borrowedEvent);
if (endOfBatch) {
streamEventChunk = batchingStreamEventChunk;
batchingStreamEventChunk = new ComplexEventChunk<StreamEvent>(this.batchProcessingAllowed);
}
}
if (streamEventChunk != null) {
if (siddhiDebugger != null) {
siddhiDebugger.checkBreakPoint(queryName, SiddhiDebugger.QueryTerminal.IN, streamEventChunk.getFirst());
}
process(streamEventChunk);
}
}
Aggregations