@Test public void assertSetReshardingFlagOnLeader() { when(leaderService.isLeaderUntilBlock()).thenReturn(true); shardingService.setReshardingFlag(); verify(jobNodeStorage).createJobNodeIfNeeded("leader/sharding/necessary"); }
public void setReshardingFlag() { if (!leaderService.isLeaderUntilBlock()) { return; } jobNodeStorage.createJobNodeIfNeeded(ShardingNode.NECESSARY); }
ShardingService { public void setReshardingFlag() { if (!leaderService.isLeaderUntilBlock()) { return; } jobNodeStorage.createJobNodeIfNeeded(ShardingNode.NECESSARY); } }
ShardingService { public void setReshardingFlag() { if (!leaderService.isLeaderUntilBlock()) { return; } jobNodeStorage.createJobNodeIfNeeded(ShardingNode.NECESSARY); } ShardingService(final CoordinatorRegistryCenter regCenter, final String jobName); }
ShardingService { public void setReshardingFlag() { if (!leaderService.isLeaderUntilBlock()) { return; } jobNodeStorage.createJobNodeIfNeeded(ShardingNode.NECESSARY); } 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 void setReshardingFlag() { if (!leaderService.isLeaderUntilBlock()) { return; } jobNodeStorage.createJobNodeIfNeeded(ShardingNode.NECESSARY); } ShardingService(final CoordinatorRegistryCenter regCenter, final String jobName); void setReshardingFlag(); boolean isNeedSharding(); void shardingIfNecessary(); List<Integer> getShardingItems(final String jobInstanceId); List<Integer> getLocalShardingItems(); boolean hasShardingInfoInOfflineServers();  }