private void updateStoreTableSize() throws ConnectionUnavailableException {
        if (cacheEnabled && !queryStoreWithoutCheckingCache.get()) {
            readWriteLock.writeLock().lock();
            try {
                // check if we need to check the size of store
                if (storeTableSize == -1 || (!cacheExpiryEnabled && storeSizeLastCheckedTime < siddhiAppContext.
                        getTimestampGenerator().currentTime() - storeSizeCheckInterval)) {
                    StateEvent stateEventForCaching = new StateEvent(1, 0);
                    queryStoreWithoutCheckingCache.set(Boolean.TRUE);
                    try {
                        StreamEvent preLoadedData = query(stateEventForCaching, compiledConditionForCaching,
                                compiledSelectionForCaching, outputAttributesForCaching);
                        storeTableSize = findEventChunkSize(preLoadedData);
                        storeSizeLastCheckedTime = siddhiAppContext.getTimestampGenerator().currentTime();
                    } finally {
                        queryStoreWithoutCheckingCache.set(Boolean.FALSE);
                    }
                }
            } finally {
                readWriteLock.writeLock().unlock();
            }
        }
    }
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