All Downloads are FREE. Search and download functionalities are using the official Maven repository.

system.task.TaskManager Maven / Gradle / Ivy

There is a newer version: 1.6.7
Show newest version
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);

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy