package com.dlink.service;


import com.dlink.db.service.ISuperService;
import com.dlink.job.JobResult;
import com.dlink.model.JobInfoDetail;
import com.dlink.model.JobInstance;
import com.dlink.model.Task;

import java.util.List;

/**
 * 作业 服务类
 *
 * @author wenmo
 * @since 2021-05-28
 */
public interface TaskService extends ISuperService<Task> {

    JobResult submitByTaskId(Integer id);

    JobResult restartByTaskId(Integer id);

    Task getTaskInfoById(Integer id);

    boolean saveOrUpdateTask(Task task);

    List<Task> listFlinkSQLEnv();

    String exportSql(Integer id);

    Task getUDFByClassName(String className);

    boolean releaseTask(Integer id);

    boolean developTask(Integer id);

    boolean onLineTask(Integer id);

    boolean offLineTask(Integer id);

    boolean cancelTask(Integer id);

    boolean recoveryTask(Integer id);

    boolean savepointTask(Integer taskId,String savePointType);

    JobInstance refreshJobInstance(Integer id);

    JobInfoDetail refreshJobInfoDetail(Integer id);
}
