public Snapshot getSnapshot() {
        if (isFullSnapshot()) {
            forceFullSnapshot = false;
            return new Snapshot(this.getFirst(), false);
        } else {
            Snapshot snapshot = new Snapshot(operationChangeLog, true);
            operationChangeLog = new ArrayList<>();
            return snapshot;
        }
    }
Returns the next element in the iteration.

@return the next element in the iteration.
@throws NoSuchElementException iteration has no more elements.
modules/siddhi-core/src/main/java/io/siddhi/core/event/stream/holder/SnapshotableStreamEventQueue.java