我在 ScheduledThreadPoolExecutor 中定时调度了几个任务,
现在我想停止其中的某个任务,有没有什么好的方法?
我用
getQueue()
Returns the task queue used by this executor.
获得了任务列表,但是,无法区分这些任务是哪个任务,因为我只想停止那个特定的任务。
现在我想停止其中的某个任务,有没有什么好的方法?
我用
getQueue()
Returns the task queue used by this executor.
获得了任务列表,但是,无法区分这些任务是哪个任务,因为我只想停止那个特定的任务。
public boolean deleteJob(String jobName, String groupName) throws SchedulerException;ScheduledThreadPoolExecutor是调用Job的线程,不是job。