public static void addStreamJunction(StreamDefinition streamDefinition,
                                         ConcurrentMap<String, StreamJunction> streamJunctionMap,
                                         SiddhiAppContext siddhiAppContext) {
        if (!streamJunctionMap.containsKey(streamDefinition.getId())) {
            StreamJunction faultStreamJunction = streamJunctionMap.get(SiddhiConstants.FAULT_STREAM_PREFIX.
                    concat(streamDefinition.getId()));
            StreamJunction streamJunction = new StreamJunction(streamDefinition,
                    siddhiAppContext.getExecutorService(),
                    siddhiAppContext.getBufferSize(), faultStreamJunction, siddhiAppContext);
            streamJunctionMap.putIfAbsent(streamDefinition.getId(), streamJunction);
        }
    }
Utility class for queryParser to help with QueryRuntime
generation.
modules/siddhi-core/src/main/java/io/siddhi/core/util/parser/helper/DefinitionParserHelper.java