@Test public void assertGetLocalFailoverItemsIfShutdown() { assertThat(failoverService.getLocalFailoverItems(), is(Collections.<Integer>emptyList())); verify(jobNodeStorage, times(0)).getJobNodeChildrenKeys("sharding"); }
public List<Integer> getLocalFailoverItems() { if (JobRegistry.getInstance().isShutdown(jobName)) { return Collections.emptyList(); } return getFailoverItems(JobRegistry.getInstance().getJobInstance(jobName).getJobInstanceId()); }
FailoverService { public List<Integer> getLocalFailoverItems() { if (JobRegistry.getInstance().isShutdown(jobName)) { return Collections.emptyList(); } return getFailoverItems(JobRegistry.getInstance().getJobInstance(jobName).getJobInstanceId()); } }
FailoverService { public List<Integer> getLocalFailoverItems() { if (JobRegistry.getInstance().isShutdown(jobName)) { return Collections.emptyList(); } return getFailoverItems(JobRegistry.getInstance().getJobInstance(jobName).getJobInstanceId()); } FailoverService(final CoordinatorRegistryCenter regCenter, final String jobName); }
FailoverService { public List<Integer> getLocalFailoverItems() { if (JobRegistry.getInstance().isShutdown(jobName)) { return Collections.emptyList(); } return getFailoverItems(JobRegistry.getInstance().getJobInstance(jobName).getJobInstanceId()); } FailoverService(final CoordinatorRegistryCenter regCenter, final String jobName); void setCrashedFailoverFlag(final int item); void failoverIfNecessary(); void updateFailoverComplete(final Collection<Integer> items); List<Integer> getFailoverItems(final String jobInstanceId); List<Integer> getLocalFailoverItems(); List<Integer> getLocalTakeOffItems(); void removeFailoverInfo(); }
FailoverService { public List<Integer> getLocalFailoverItems() { if (JobRegistry.getInstance().isShutdown(jobName)) { return Collections.emptyList(); } return getFailoverItems(JobRegistry.getInstance().getJobInstance(jobName).getJobInstanceId()); } FailoverService(final CoordinatorRegistryCenter regCenter, final String jobName); void setCrashedFailoverFlag(final int item); void failoverIfNecessary(); void updateFailoverComplete(final Collection<Integer> items); List<Integer> getFailoverItems(final String jobInstanceId); List<Integer> getLocalFailoverItems(); List<Integer> getLocalTakeOffItems(); void removeFailoverInfo();  }