private void processLengthZeroBatch(StreamEvent streamEvent,
                                        ComplexEventChunk<StreamEvent> outputStreamEventChunk,
                                        long currentTime, StreamEventCloner streamEventCloner) {

        outputStreamEventChunk.add(streamEvent);
        if (outputExpectsExpiredEvents) {
            StreamEvent expiredEvent = streamEventCloner.copyStreamEvent(streamEvent);
            expiredEvent.setType(ComplexEvent.Type.EXPIRED);
            expiredEvent.setTimestamp(currentTime);
            outputStreamEventChunk.add(expiredEvent);
        }
        StreamEvent resetEvent = streamEventCloner.copyStreamEvent(streamEvent);
        resetEvent.setType(ComplexEvent.Type.RESET);
        resetEvent.setTimestamp(currentTime);
        outputStreamEventChunk.add(resetEvent);
    }
Implementation of {@link WindowProcessor} which represent a Batch Window operating based on pre-defined length.
modules/siddhi-core/src/main/java/io/siddhi/core/query/processor/stream/window/LengthBatchWindowProcessor.java