@Test public void assertCreateJobNodeIfRootJobNodeIsNotExist() { when(regCenter.isExisted("/test_job")).thenReturn(false); jobNodeStorage.createJobNodeIfNeeded("config"); verify(regCenter).isExisted("/test_job"); verify(regCenter, times(0)).isExisted("/test_job/config"); verify(regCenter, times(0)).persist("/test_job/config", ""); }
public void createJobNodeIfNeeded(final String node) { if (isJobRootNodeExisted() && !isJobNodeExisted(node)) { regCenter.persist(jobNodePath.getFullPath(node), ""); } }
JobNodeStorage { public void createJobNodeIfNeeded(final String node) { if (isJobRootNodeExisted() && !isJobNodeExisted(node)) { regCenter.persist(jobNodePath.getFullPath(node), ""); } } }
JobNodeStorage { public void createJobNodeIfNeeded(final String node) { if (isJobRootNodeExisted() && !isJobNodeExisted(node)) { regCenter.persist(jobNodePath.getFullPath(node), ""); } } JobNodeStorage(final CoordinatorRegistryCenter regCenter, final String jobName); }
JobNodeStorage { public void createJobNodeIfNeeded(final String node) { if (isJobRootNodeExisted() && !isJobNodeExisted(node)) { regCenter.persist(jobNodePath.getFullPath(node), ""); } } JobNodeStorage(final CoordinatorRegistryCenter regCenter, final String jobName); boolean isJobNodeExisted(final String node); boolean isJobRootNodeExisted(); String getJobNodeData(final String node); String getJobNodeDataDirectly(final String node); List<String> getJobNodeChildrenKeys(final String node); String getJobRootNodeData(); void createJobNodeIfNeeded(final String node); void removeJobNodeIfExisted(final String node); void fillJobNode(final String node, final Object value); void fillEphemeralJobNode(final String node, final Object value); void updateJobNode(final String node, final Object value); void replaceJobNode(final String node, final Object value); void replaceJobRootNode(final Object value); void executeInTransaction(final TransactionExecutionCallback callback); void executeInLeader(final String latchNode, final LeaderExecutionCallback callback); void addConnectionStateListener(final ConnectionStateListener listener); void addDataListener(final CuratorCacheListener listener); long getRegistryCenterTime(); }
JobNodeStorage { public void createJobNodeIfNeeded(final String node) { if (isJobRootNodeExisted() && !isJobNodeExisted(node)) { regCenter.persist(jobNodePath.getFullPath(node), ""); } } JobNodeStorage(final CoordinatorRegistryCenter regCenter, final String jobName); boolean isJobNodeExisted(final String node); boolean isJobRootNodeExisted(); String getJobNodeData(final String node); String getJobNodeDataDirectly(final String node); List<String> getJobNodeChildrenKeys(final String node); String getJobRootNodeData(); void createJobNodeIfNeeded(final String node); void removeJobNodeIfExisted(final String node); void fillJobNode(final String node, final Object value); void fillEphemeralJobNode(final String node, final Object value); void updateJobNode(final String node, final Object value); void replaceJobNode(final String node, final Object value); void replaceJobRootNode(final Object value); void executeInTransaction(final TransactionExecutionCallback callback); void executeInLeader(final String latchNode, final LeaderExecutionCallback callback); void addConnectionStateListener(final ConnectionStateListener listener); void addDataListener(final CuratorCacheListener listener); long getRegistryCenterTime();  }