@Override
    public Map<String, State> getAllGroupByStates() {
        String partitionFlowId = SiddhiAppContext.getPartitionFlowId();
        return states.computeIfAbsent(partitionFlowId, k -> new HashMap<>());
    }
State holder for  partitioned use case
modules/siddhi-core/src/main/java/io/siddhi/core/util/snapshot/state/PartitionStateHolder.java