@Override
    public State cleanGroupByStates() {
        State returnValue = state;
        state = null;
        groupByStates.clear();
        return returnValue;
    }
State holder for non partition use case
modules/siddhi-core/src/main/java/io/siddhi/core/util/snapshot/state/SingleStateHolder.java