use of io.siddhi.core.query.processor.stream.window.WindowWindowProcessor in project siddhi by wso2.
the class JoinInputStreamParser method setStreamRuntimeProcessorChain.
private static void setStreamRuntimeProcessorChain(MetaStreamEvent metaStreamEvent, SingleStreamRuntime streamRuntime, String inputStreamId, Map<String, Table> tableMap, Map<String, Window> windowMap, Map<String, AggregationRuntime> aggregationMap, List<VariableExpressionExecutor> variableExpressionExecutors, boolean outputExpectsExpiredEvents, Within within, Expression per, List<Variable> queryGroupByList, SiddhiQueryContext siddhiQueryContext, InputStream inputStream) {
switch(metaStreamEvent.getEventType()) {
case TABLE:
TableWindowProcessor tableWindowProcessor = new TableWindowProcessor(tableMap.get(inputStreamId));
tableWindowProcessor.initProcessor(metaStreamEvent, new ExpressionExecutor[0], null, outputExpectsExpiredEvents, true, false, inputStream, siddhiQueryContext);
streamRuntime.setProcessorChain(tableWindowProcessor);
break;
case WINDOW:
WindowWindowProcessor windowWindowProcessor = new WindowWindowProcessor(windowMap.get(inputStreamId));
windowWindowProcessor.initProcessor(metaStreamEvent, variableExpressionExecutors.toArray(new ExpressionExecutor[0]), null, outputExpectsExpiredEvents, true, false, inputStream, siddhiQueryContext);
streamRuntime.setProcessorChain(windowWindowProcessor);
break;
case AGGREGATE:
AggregationRuntime aggregationRuntime = aggregationMap.get(inputStreamId);
AggregateWindowProcessor aggregateWindowProcessor = new AggregateWindowProcessor(aggregationRuntime, within, per, queryGroupByList);
aggregateWindowProcessor.initProcessor(metaStreamEvent, variableExpressionExecutors.toArray(new ExpressionExecutor[0]), null, outputExpectsExpiredEvents, true, false, inputStream, siddhiQueryContext);
streamRuntime.setProcessorChain(aggregateWindowProcessor);
break;
case DEFAULT:
break;
}
}
Aggregations