@Test public void assertGetLocalShardingItemsWithInstanceShutdown() { assertThat(shardingService.getLocalShardingItems(), is(Collections.<Integer>emptyList())); }
public List<Integer> getLocalShardingItems() { if (JobRegistry.getInstance().isShutdown(jobName) || !serverService.isAvailableServer(JobRegistry.getInstance().getJobInstance(jobName).getIp())) { return Collections.emptyList(); } return getShardingItems(JobRegistry.getInstance().getJobInstance(jobName).getJobInstanceId()); }
ShardingService { public List<Integer> getLocalShardingItems() { if (JobRegistry.getInstance().isShutdown(jobName) || !serverService.isAvailableServer(JobRegistry.getInstance().getJobInstance(jobName).getIp())) { return Collections.emptyList(); } return getShardingItems(JobRegistry.getInstance().getJobInstance(jobName).getJobInstanceId()); } }
ShardingService { public List<Integer> getLocalShardingItems() { if (JobRegistry.getInstance().isShutdown(jobName) || !serverService.isAvailableServer(JobRegistry.getInstance().getJobInstance(jobName).getIp())) { return Collections.emptyList(); } return getShardingItems(JobRegistry.getInstance().getJobInstance(jobName).getJobInstanceId()); } ShardingService(final CoordinatorRegistryCenter regCenter, final String jobName); }
ShardingService { public List<Integer> getLocalShardingItems() { if (JobRegistry.getInstance().isShutdown(jobName) || !serverService.isAvailableServer(JobRegistry.getInstance().getJobInstance(jobName).getIp())) { return Collections.emptyList(); } return getShardingItems(JobRegistry.getInstance().getJobInstance(jobName).getJobInstanceId()); } ShardingService(final CoordinatorRegistryCenter regCenter, final String jobName); void setReshardingFlag(); boolean isNeedSharding(); void shardingIfNecessary(); List<Integer> getShardingItems(final String jobInstanceId); List<Integer> getLocalShardingItems(); boolean hasShardingInfoInOfflineServers(); }
ShardingService { public List<Integer> getLocalShardingItems() { if (JobRegistry.getInstance().isShutdown(jobName) || !serverService.isAvailableServer(JobRegistry.getInstance().getJobInstance(jobName).getIp())) { return Collections.emptyList(); } return getShardingItems(JobRegistry.getInstance().getJobInstance(jobName).getJobInstanceId()); } ShardingService(final CoordinatorRegistryCenter regCenter, final String jobName); void setReshardingFlag(); boolean isNeedSharding(); void shardingIfNecessary(); List<Integer> getShardingItems(final String jobInstanceId); List<Integer> getLocalShardingItems(); boolean hasShardingInfoInOfflineServers();  }