public synchronized Map<String, StreamEvent> getGroupedByEvents() {
        Map<String, StreamEvent> groupedByEvents = new HashMap<>();

        if (isProcessed()) {
            Map<String, ValueState> baseIncrementalValueStoreMap = this.valueStateHolder.getAllGroupByStates();
            try {
                for (Map.Entry<String, ValueState> state : baseIncrementalValueStoreMap.entrySet()) {
                    StreamEvent streamEvent = streamEventFactory.newInstance();
                    long timestamp = getTimestamp();
                    streamEvent.setTimestamp(timestamp);
                    state.getValue().setValue(timestamp, 0);
                    streamEvent.setOutputData(state.getValue().values);
                    groupedByEvents.put(state.getKey(), streamEvent);
                }
            } finally {
                this.valueStateHolder.returnGroupByStates(baseIncrementalValueStoreMap);
            }
        }
        return groupedByEvents;
    }
Store for maintaining the base values related to incremental aggregation. (e.g. for average,
the base incremental values would be sum and count. The timestamp too is stored here.
modules/siddhi-core/src/main/java/io/siddhi/core/aggregation/BaseIncrementalValueStore.java