@Test public void assertRegisterStart() { guaranteeService.registerStart(Arrays.asList(0, 1)); verify(jobNodeStorage).createJobNodeIfNeeded("guarantee/started/0"); verify(jobNodeStorage).createJobNodeIfNeeded("guarantee/started/1"); }
public void registerStart(final Collection<Integer> shardingItems) { for (int each : shardingItems) { jobNodeStorage.createJobNodeIfNeeded(GuaranteeNode.getStartedNode(each)); } }
GuaranteeService { public void registerStart(final Collection<Integer> shardingItems) { for (int each : shardingItems) { jobNodeStorage.createJobNodeIfNeeded(GuaranteeNode.getStartedNode(each)); } } }
GuaranteeService { public void registerStart(final Collection<Integer> shardingItems) { for (int each : shardingItems) { jobNodeStorage.createJobNodeIfNeeded(GuaranteeNode.getStartedNode(each)); } } GuaranteeService(final CoordinatorRegistryCenter regCenter, final String jobName); }
GuaranteeService { public void registerStart(final Collection<Integer> shardingItems) { for (int each : shardingItems) { jobNodeStorage.createJobNodeIfNeeded(GuaranteeNode.getStartedNode(each)); } } GuaranteeService(final CoordinatorRegistryCenter regCenter, final String jobName); void registerStart(final Collection<Integer> shardingItems); boolean isRegisterStartSuccess(final Collection<Integer> shardingItems); boolean isAllStarted(); void clearAllStartedInfo(); void registerComplete(final Collection<Integer> shardingItems); boolean isRegisterCompleteSuccess(final Collection<Integer> shardingItems); boolean isAllCompleted(); void clearAllCompletedInfo(); }
GuaranteeService { public void registerStart(final Collection<Integer> shardingItems) { for (int each : shardingItems) { jobNodeStorage.createJobNodeIfNeeded(GuaranteeNode.getStartedNode(each)); } } GuaranteeService(final CoordinatorRegistryCenter regCenter, final String jobName); void registerStart(final Collection<Integer> shardingItems); boolean isRegisterStartSuccess(final Collection<Integer> shardingItems); boolean isAllStarted(); void clearAllStartedInfo(); void registerComplete(final Collection<Integer> shardingItems); boolean isRegisterCompleteSuccess(final Collection<Integer> shardingItems); boolean isAllCompleted(); void clearAllCompletedInfo();  }