use of org.wso2.siddhi.core.event.stream.converter.StreamEventConverter in project siddhi by wso2.
the class MultiProcessStreamReceiver method receive.
@Override
public void receive(Event event, boolean endOfBatch) {
eventBuffer.add(event);
if (endOfBatch) {
for (Event aEvent : eventBuffer) {
synchronized (this) {
stabilizeStates();
for (int anEventSequence : eventSequence) {
StreamEventConverter aStreamEventConverter = streamEventConverters[anEventSequence];
StreamEventPool aStreamEventPool = streamEventPools[anEventSequence];
StreamEvent borrowedEvent = aStreamEventPool.borrowEvent();
aStreamEventConverter.convertEvent(aEvent, borrowedEvent);
process(anEventSequence, borrowedEvent);
}
}
}
eventBuffer.clear();
}
}
use of org.wso2.siddhi.core.event.stream.converter.StreamEventConverter in project siddhi by wso2.
the class MultiProcessStreamReceiver method receive.
@Override
public void receive(Event[] events) {
for (Event event : events) {
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.wso2.siddhi.core.event.stream.converter.StreamEventConverter in project siddhi by wso2.
the class Scheduler method setStreamEventPool.
public void setStreamEventPool(StreamEventPool streamEventPool) {
this.streamEventPool = streamEventPool;
streamEventChunk = new ConversionStreamEventChunk((StreamEventConverter) null, streamEventPool);
}
Aggregations