@Override
    public void updateOrAdd(ComplexEventChunk<StateEvent> updateOrAddingEventChunk,
                            CompiledCondition compiledCondition, CompiledUpdateSet compiledUpdateSet,
                            AddingStreamEventExtractor addingStreamEventExtractor) {
        RecordStoreCompiledCondition recordStoreCompiledCondition =
                ((RecordStoreCompiledCondition) compiledCondition);
        RecordTableCompiledUpdateSet recordTableCompiledUpdateSet = (RecordTableCompiledUpdateSet) compiledUpdateSet;
        List<Map<String, Object>> updateConditionParameterMaps = new ArrayList<>();
        List<Map<String, Object>> updateSetParameterMaps = new ArrayList<>();
        List<Object[]> addingRecords = new ArrayList<>();
        updateOrAddingEventChunk.reset();
        long timestamp = 0L;
        while (updateOrAddingEventChunk.hasNext()) {
            StateEvent stateEvent = updateOrAddingEventChunk.next();

            Map<String, Object> variableMap = new HashMap<>();
            for (Map.Entry<String, ExpressionExecutor> entry :
                    recordStoreCompiledCondition.variableExpressionExecutorMap.entrySet()) {
                variableMap.put(entry.getKey(), entry.getValue().execute(stateEvent));
            }
            updateConditionParameterMaps.add(variableMap);

            Map<String, Object> variableMapForUpdateSet = new HashMap<>();
            for (Map.Entry<String, ExpressionExecutor> entry :
                    recordTableCompiledUpdateSet.getExpressionExecutorMap().entrySet()) {
                variableMapForUpdateSet.put(entry.getKey(), entry.getValue().execute(stateEvent));
            }
            updateSetParameterMaps.add(variableMapForUpdateSet);
            addingRecords.add(stateEvent.getStreamEvent(0).getOutputData());
            timestamp = stateEvent.getTimestamp();
        }
        try {
            if (recordTableHandler != null) {
                recordTableHandler.updateOrAdd(timestamp, recordStoreCompiledCondition.getCompiledCondition(),
                        updateConditionParameterMaps, recordTableCompiledUpdateSet.getUpdateSetMap(),
                        updateSetParameterMaps, addingRecords);
            } else {
                updateOrAdd(recordStoreCompiledCondition.getCompiledCondition(), updateConditionParameterMaps,
                        recordTableCompiledUpdateSet.getUpdateSetMap(), updateSetParameterMaps, addingRecords);
            }
        } catch (ConnectionUnavailableException | DatabaseRuntimeException e) {
            onUpdateOrAddError(updateOrAddingEventChunk, compiledCondition, compiledUpdateSet,
                    addingStreamEventExtractor, e);
        }
    }
Update all matching records

@param updateCondition              the compiledCondition against which records should be matched for update
@param updateConditionParameterMaps map of matching StreamVariable Ids and their values corresponding to the
                                    compiled condition based on which the records will be updated
@param updateSetExpressions         the set of updates mappings and related complied expressions
@param updateSetParameterMaps       map of matching StreamVariable Ids and their values corresponding to the
@throws ConnectionUnavailableException
modules/siddhi-core/src/main/java/io/siddhi/core/table/record/AbstractRecordTable.java