@Override
    protected StateFactory init(ExpressionExecutor[] attributeExpressionExecutors, ConfigReader configReader,
                                SiddhiQueryContext siddhiQueryContext) {
        if (attributeExpressionExecutors.length == 1) {
            length = (Integer) ((ConstantExpressionExecutor) attributeExpressionExecutors[0]).getValue();
        } else {
            throw new SiddhiAppValidationException("Length window should only have one parameter (<int> " +
                    "window.length), but found " + attributeExpressionExecutors.length + " input parameters.");
        }
        return () -> new WindowState();
    }
Implementation of {@link WindowProcessor} which represent a Window operating based on a pre-defined length.
modules/siddhi-core/src/main/java/io/siddhi/core/query/processor/stream/window/LengthWindowProcessor.java