class ReadyService {

    public void addTransient(final String jobName) {
        if (regCenter.getNumChildren(ReadyNode.ROOT) > env.getFrameworkConfiguration().getJobStateQueueSize()) {
            log.warn("Cannot add transient job, caused by read state queue size is larger than {}.", env.getFrameworkConfiguration().getJobStateQueueSize());
            return;
        }
        Optional<CloudJobConfiguration> cloudJobConfig = configService.load(jobName);
        if (!cloudJobConfig.isPresent() || CloudJobExecutionType.TRANSIENT != cloudJobConfig.get().getJobExecutionType()) {
            return;
        }
        String readyJobNode = ReadyNode.getReadyJobNodePath(jobName);
        String times = regCenter.getDirectly(readyJobNode);
        if (cloudJobConfig.get().getTypeConfig().getCoreConfig().isMisfire()) {
            regCenter.persist(readyJobNode, Integer.toString(null == times ? 1 : Integer.parseInt(times) + 1));
        } else {
            regCenter.persist(ReadyNode.getReadyJobNodePath(jobName), "1");
        }
    }

    public  ReadyService(final CoordinatorRegistryCenter regCenter);

}