@Test public void assertSetMisfireDisabledWhenReadyNodeNotExisted() { when(configService.load("test_job")).thenReturn(Optional.of(CloudJobConfigurationBuilder.createCloudJobConfiguration("test_job"))); readyService.setMisfireDisabled("test_job"); verify(regCenter, times(0)).persist("/state/ready/test_job", "1"); }
public void setMisfireDisabled(final String jobName) { Optional<CloudJobConfigurationPOJO> cloudJobConfig = configService.load(jobName); if (cloudJobConfig.isPresent() && null != regCenter.getDirectly(ReadyNode.getReadyJobNodePath(jobName))) { regCenter.persist(ReadyNode.getReadyJobNodePath(jobName), "1"); } }
ReadyService { public void setMisfireDisabled(final String jobName) { Optional<CloudJobConfigurationPOJO> cloudJobConfig = configService.load(jobName); if (cloudJobConfig.isPresent() && null != regCenter.getDirectly(ReadyNode.getReadyJobNodePath(jobName))) { regCenter.persist(ReadyNode.getReadyJobNodePath(jobName), "1"); } } }
ReadyService { public void setMisfireDisabled(final String jobName) { Optional<CloudJobConfigurationPOJO> cloudJobConfig = configService.load(jobName); if (cloudJobConfig.isPresent() && null != regCenter.getDirectly(ReadyNode.getReadyJobNodePath(jobName))) { regCenter.persist(ReadyNode.getReadyJobNodePath(jobName), "1"); } } ReadyService(final CoordinatorRegistryCenter regCenter); }
ReadyService { public void setMisfireDisabled(final String jobName) { Optional<CloudJobConfigurationPOJO> cloudJobConfig = configService.load(jobName); if (cloudJobConfig.isPresent() && null != regCenter.getDirectly(ReadyNode.getReadyJobNodePath(jobName))) { regCenter.persist(ReadyNode.getReadyJobNodePath(jobName), "1"); } } ReadyService(final CoordinatorRegistryCenter regCenter); void addTransient(final String jobName); void addDaemon(final String jobName); void setMisfireDisabled(final String jobName); Collection<JobContext> getAllEligibleJobContexts(final Collection<JobContext> ineligibleJobContexts); void remove(final Collection<String> jobNames); Map<String, Integer> getAllReadyTasks(); }
ReadyService { public void setMisfireDisabled(final String jobName) { Optional<CloudJobConfigurationPOJO> cloudJobConfig = configService.load(jobName); if (cloudJobConfig.isPresent() && null != regCenter.getDirectly(ReadyNode.getReadyJobNodePath(jobName))) { regCenter.persist(ReadyNode.getReadyJobNodePath(jobName), "1"); } } ReadyService(final CoordinatorRegistryCenter regCenter); void addTransient(final String jobName); void addDaemon(final String jobName); void setMisfireDisabled(final String jobName); Collection<JobContext> getAllEligibleJobContexts(final Collection<JobContext> ineligibleJobContexts); void remove(final Collection<String> jobNames); Map<String, Integer> getAllReadyTasks();  }