package cn.superdesk.uniorder.common.queue.block;

/**
 * @Description: 获取当前运行任务的方法
 * LogTask task = (LogTask) CurrentRunningTask.getCurrentShowingTask();
 * @Author: linjinyu
 * @CreateDate: 2021/9/9 下午3:47
 * @UpdateUser: linjinyu
 * @UpdateDate: 2021/9/9 下午3:47
 * @UpdateRemark: 修改内容
 * @Version: 1.0
 */
public class CurrentRunningTask {

	private static TaskInterface sCurrentShowingTask;

	public static void setCurrentShowingTask(TaskInterface task) {
		sCurrentShowingTask = task;
	}

	public static void removeCurrentShowingTask() {
		sCurrentShowingTask = null;
	}

	public static TaskInterface getCurrentShowingTask() {
		return sCurrentShowingTask;
	}

	public static boolean getCurrentShowingStatus() {
		return sCurrentShowingTask != null && sCurrentShowingTask.getStatus();
	}
}
