@Override
    public void add(ComplexEventChunk<StreamEvent> addingEventChunk) {
        if (cacheEnabled) {
            readWriteLock.writeLock().lock();
            try {
                ((CacheTable) cacheTable).addAndTrimUptoMaxSize(addingEventChunk);
                super.add(addingEventChunk);
            } finally {
                readWriteLock.writeLock().unlock();
            }
        } else {
            super.add(addingEventChunk);
        }
    }
An abstract implementation of table. Abstract implementation will handle {@link ComplexEventChunk} so that
developer can directly work with event data.
modules/siddhi-core/src/main/java/io/siddhi/core/table/record/AbstractQueryableRecordTable.java