@Override
    public synchronized void returnAllStates(Map states) {
        for (Map<String, State> groupByStates : ((Map<String, Map<String, State>>) states).values()) {
            for (State state : groupByStates.values()) {
                state.activeUseCount--;
            }
        }
        partitionStateHolder.returnAllStates(states);
    }
State holder for  partitioned use case
modules/siddhi-core/src/main/java/io/siddhi/core/util/snapshot/state/PartitionSyncStateHolder.java