@Test public void assertDisableWithServerIp() { when(regCenter.getChildrenKeys("/")).thenReturn(Arrays.asList("test_job1", "test_job2")); when(regCenter.isExisted("/test_job1/servers/localhost")).thenReturn(true); when(regCenter.isExisted("/test_job2/servers/localhost")).thenReturn(true); jobOperateAPI.disable(null, "localhost"); verify(regCenter).getChildrenKeys("/"); verify(regCenter).persist("/test_job1/servers/localhost", "DISABLED"); verify(regCenter).persist("/test_job2/servers/localhost", "DISABLED"); }
@Override public void disable(final String jobName, final String serverIp) { disableOrEnableJobs(jobName, serverIp, true); }
JobOperateAPIImpl implements JobOperateAPI { @Override public void disable(final String jobName, final String serverIp) { disableOrEnableJobs(jobName, serverIp, true); } }
JobOperateAPIImpl implements JobOperateAPI { @Override public void disable(final String jobName, final String serverIp) { disableOrEnableJobs(jobName, serverIp, true); } JobOperateAPIImpl(final CoordinatorRegistryCenter regCenter); }
JobOperateAPIImpl implements JobOperateAPI { @Override public void disable(final String jobName, final String serverIp) { disableOrEnableJobs(jobName, serverIp, true); } JobOperateAPIImpl(final CoordinatorRegistryCenter regCenter); @Override void trigger(final String jobName); @Override void disable(final String jobName, final String serverIp); @Override void enable(final String jobName, final String serverIp); @Override void shutdown(final String jobName, final String serverIp); @Override void remove(final String jobName, final String serverIp); }
JobOperateAPIImpl implements JobOperateAPI { @Override public void disable(final String jobName, final String serverIp) { disableOrEnableJobs(jobName, serverIp, true); } JobOperateAPIImpl(final CoordinatorRegistryCenter regCenter); @Override void trigger(final String jobName); @Override void disable(final String jobName, final String serverIp); @Override void enable(final String jobName, final String serverIp); @Override void shutdown(final String jobName, final String serverIp); @Override void remove(final String jobName, final String serverIp);  }