@Override
    public ComplexEventChunk<StateEvent> tryUpdate(ComplexEventChunk<StateEvent> updatingOrAddingEventChunk,
                                                   Object storeEvents,
                                                   InMemoryCompiledUpdateSet compiledUpdateSet,
                                                   AddingStreamEventExtractor addingStreamEventExtractor) {
        SnapshotableStreamEventQueue storeEventQueue = (SnapshotableStreamEventQueue) storeEvents;
        updatingOrAddingEventChunk.reset();
        ComplexEventChunk<StateEvent> failedEventChunk = new ComplexEventChunk<>();
        while (updatingOrAddingEventChunk.hasNext()) {
            StateEvent overwritingOrAddingEvent = updatingOrAddingEventChunk.next();
            try {
                boolean updated = false;
                storeEventQueue.reset();
                while (storeEventQueue.hasNext()) {
                    StreamEvent storeEvent = storeEventQueue.next();
                    overwritingOrAddingEvent.setEvent(storeEventPosition, storeEvent);
                    if ((Boolean) expressionExecutor.execute(overwritingOrAddingEvent)) {
                        for (Map.Entry<Integer, ExpressionExecutor> entry :
                                compiledUpdateSet.getExpressionExecutorMap().entrySet()) {
                            storeEvent.setOutputData(entry.getValue().
                                    execute(overwritingOrAddingEvent), entry.getKey());
                        }
                        storeEventQueue.overwrite(storeEvent);
                        updated = true;
                    }
                }
                if (!updated) {
                    updatingOrAddingEventChunk.remove();
                    failedEventChunk.add(overwritingOrAddingEvent);
                }
            } finally {
                overwritingOrAddingEvent.setEvent(storeEventPosition, null);
            }
        }
        return failedEventChunk;
    }
Operator which is related to non-indexed In-memory table operations.
modules/siddhi-core/src/main/java/io/siddhi/core/util/collection/operator/SnapshotableEventQueueOperator.java