@Override
    public void add(ComplexEventChunk<StreamEvent> addingEventChunk) {
        readWriteLock.writeLock().lock();
        TableState state = stateHolder.getState();
        try {
            state.eventHolder.add(addingEventChunk);
        } finally {
            stateHolder.returnState(state);
            readWriteLock.writeLock().unlock();
        }

    }
In-memory event table implementation of SiddhiQL.
modules/siddhi-core/src/main/java/io/siddhi/core/table/InMemoryTable.java