@Override
        public void restore(Map<String, Object> state) {
            count = (int) state.get("Count");
            if (currentEventQueue != null) {
                currentEventQueue.clear();
                currentEventQueue.restore((SnapshotStateList) state.get("CurrentEventQueue"));
            }

            if (expiredEventQueue != null) {
                expiredEventQueue.clear();
                expiredEventQueue.restore((SnapshotStateList) state.get("ExpiredEventQueue"));
            }
            resetEvent = (StreamEvent) state.get("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