system.task.TaskManager Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of task Show documentation
Show all versions of task Show documentation
jishi series products task on java
package system.task;
import system.task.errors.TaskException;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.Set;
/**
* 任务管理器
*/
public interface TaskManager {
void start() throws TaskException;
void stop() throws TaskException;
void pause() throws TaskException;
void resume() throws TaskException;
Task getTask(String name) throws TaskException;
/**
* 添加任务
*
* @param task
* @return true 添加成功或修改成功 , false 已存在相同任务
* @throws TaskException
*/
boolean addTask(Task task) throws TaskException;
/**
* 获取触发时间列表
*
* @param name
* @param size
* @param afterTime
* @return
* @throws TaskException
*/
List getTriggerTimes(String name, int size, Date afterTime) throws TaskException;
void delTask(String name) throws TaskException;
void startTask(String name, Map param) throws TaskException;
void stopTask(String name) throws TaskException;
void cleanNoContain(Set nameList);
}