@Override
    public void update(ComplexEventChunk<StateEvent> updatingEventChunk, CompiledCondition compiledCondition,
                       CompiledUpdateSet compiledUpdateSet) {
        RecordStoreCompiledCondition recordStoreCompiledCondition;
        RecordTableCompiledUpdateSet recordTableCompiledUpdateSet;
        CompiledConditionWithCache compiledConditionWithCache;
        CompiledUpdateSetWithCache compiledUpdateSetWithCache;
        if (cacheEnabled) {
            RecordStoreCompiledCondition compiledConditionTemp = (RecordStoreCompiledCondition) compiledCondition;
            compiledConditionWithCache = (CompiledConditionWithCache)
                    compiledConditionTemp.getCompiledCondition();
            recordStoreCompiledCondition = new RecordStoreCompiledCondition(compiledConditionTemp.
                    variableExpressionExecutorMap, compiledConditionWithCache.getStoreCompileCondition(),
                    compiledConditionTemp.getSiddhiQueryContext());
            compiledUpdateSetWithCache = (CompiledUpdateSetWithCache) compiledUpdateSet;
            recordTableCompiledUpdateSet = (RecordTableCompiledUpdateSet)
                    compiledUpdateSetWithCache.storeCompiledUpdateSet;
            readWriteLock.writeLock().lock();
            try {
                cacheTable.update(updatingEventChunk, compiledConditionWithCache.getCacheCompileCondition(),
                        compiledUpdateSetWithCache.getCacheCompiledUpdateSet());
                super.update(updatingEventChunk, recordStoreCompiledCondition, recordTableCompiledUpdateSet);
            } finally {
                readWriteLock.writeLock().unlock();
            }
        } else {
            recordStoreCompiledCondition = ((RecordStoreCompiledCondition) compiledCondition);
            recordTableCompiledUpdateSet = (RecordTableCompiledUpdateSet) compiledUpdateSet;
            super.update(updatingEventChunk, recordStoreCompiledCondition, recordTableCompiledUpdateSet);
        }
    }
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