class InMemoryCleanup {

    public void cancelEveryFlowWithoutDbUpdate() {
        for (String resourceType : InMemoryResourceStateStore.getResourceTypes()) {
            for (Long resourceId : InMemoryResourceStateStore.getAllResourceId(resourceType)) {
                InMemoryResourceStateStore.putResource(resourceType, resourceId, PollGroup.CANCELLED);
            }
        }
        for (String id : runningFlows.getRunningFlowIds()) {
            cancelFlowWithoutDbUpdate(id);
        }
    }

}