@Override
    public Map<String, State> getAllGroupByStates() {
        if (state == null) {
            synchronized (this) {
                if (state == null) {
                    state = stateFactory.createNewState();
                    groupByStates.put(null, state);
                }
            }
        }
        return groupByStates;
    }
State holder for non partition use case
modules/siddhi-core/src/main/java/io/siddhi/core/util/snapshot/state/SingleSyncStateHolder.java