@Test public void kill(){ final int jobId = 0; final ReturnT<String> retval = executorBiz.kill(jobId); Assert.assertNotNull(retval); Assert.assertNull(((ReturnT<String>) retval).getContent()); Assert.assertEquals(200, retval.getCode()); Assert.assertNull(retval.getMsg()); }
@Override public ReturnT<String> kill(int jobId) { JobThread jobThread = XxlJobExecutor.loadJobThread(jobId); if (jobThread != null) { XxlJobExecutor.removeJobThread(jobId, "scheduling center kill job."); return ReturnT.SUCCESS; } return new ReturnT<String>(ReturnT.SUCCESS_CODE, "job thread already killed."); }
ExecutorBizImpl implements ExecutorBiz { @Override public ReturnT<String> kill(int jobId) { JobThread jobThread = XxlJobExecutor.loadJobThread(jobId); if (jobThread != null) { XxlJobExecutor.removeJobThread(jobId, "scheduling center kill job."); return ReturnT.SUCCESS; } return new ReturnT<String>(ReturnT.SUCCESS_CODE, "job thread already killed."); } }
ExecutorBizImpl implements ExecutorBiz { @Override public ReturnT<String> kill(int jobId) { JobThread jobThread = XxlJobExecutor.loadJobThread(jobId); if (jobThread != null) { XxlJobExecutor.removeJobThread(jobId, "scheduling center kill job."); return ReturnT.SUCCESS; } return new ReturnT<String>(ReturnT.SUCCESS_CODE, "job thread already killed."); }  }
ExecutorBizImpl implements ExecutorBiz { @Override public ReturnT<String> kill(int jobId) { JobThread jobThread = XxlJobExecutor.loadJobThread(jobId); if (jobThread != null) { XxlJobExecutor.removeJobThread(jobId, "scheduling center kill job."); return ReturnT.SUCCESS; } return new ReturnT<String>(ReturnT.SUCCESS_CODE, "job thread already killed."); }  @Override ReturnT<String> beat(); @Override ReturnT<String> idleBeat(int jobId); @Override ReturnT<String> kill(int jobId); @Override ReturnT<LogResult> log(long logDateTim, long logId, int fromLineNum); @Override ReturnT<String> run(TriggerParam triggerParam); }
ExecutorBizImpl implements ExecutorBiz { @Override public ReturnT<String> kill(int jobId) { JobThread jobThread = XxlJobExecutor.loadJobThread(jobId); if (jobThread != null) { XxlJobExecutor.removeJobThread(jobId, "scheduling center kill job."); return ReturnT.SUCCESS; } return new ReturnT<String>(ReturnT.SUCCESS_CODE, "job thread already killed."); }  @Override ReturnT<String> beat(); @Override ReturnT<String> idleBeat(int jobId); @Override ReturnT<String> kill(int jobId); @Override ReturnT<LogResult> log(long logDateTim, long logId, int fromLineNum); @Override ReturnT<String> run(TriggerParam triggerParam);  }