@Override
    public StreamEvent find(StateEvent matchingEvent, CompiledCondition compiledCondition) {
        S state = stateHolder.getState();
        try {
            return find(matchingEvent, compiledCondition, streamEventClonerHolder.getStreamEventCloner(),
                    state);
        } finally {
            stateHolder.returnState(state);
        }

    }
Window to process events as batches while supporting event search

@param <S> current state of the processor
modules/siddhi-core/src/main/java/io/siddhi/core/query/processor/stream/window/BatchingFindableWindowProcessor.java