package com.yiidata.intergration.web.task; /** * * Spark 任务并发控制,控制总超类 * *
 *
 * Created by zhaopx.
 * User: zhaopx
 * Date: 2020/11/17
 * Time: 11:11
 *
 * 
* * @author zhaopx */ public abstract class SuperTask implements Runnable { final String taskId; public SuperTask(String taskId) { this.taskId = taskId; } /** * 获取前端 TASKID * * @return */ public final String getTaskId() { return taskId; } /** * 执行任务 */ @Override public final void run() { try { doExecute(); } catch (Exception e) { throw new IllegalStateException(e); } } /** * 执行任务 * @throws Exception */ public abstract void doExecute() throws Exception; }