class ReadyService {

    public void remove(final Collection<String> jobNames) {
        for (String each : jobNames) {
            String readyJobNode = ReadyNode.getReadyJobNodePath(each);
            String timesStr = regCenter.getDirectly(readyJobNode);
            int times = null == timesStr ? 0 : Integer.parseInt(timesStr);
            if (times <= 1) {
                regCenter.remove(readyJobNode);
            } else {
                regCenter.persist(readyJobNode, Integer.toString(times - 1));
            }
        }
    }

    public  ReadyService(final CoordinatorRegistryCenter regCenter);

}