package com.tofly.common.schedulle.config;

import java.util.concurrent.ScheduledFuture;

/**
 * @author tuonbed
 * @date 2020/3/26  14:34
 */
public class MyScheduleTask {
    public volatile ScheduledFuture<?> future;
    /**
     * 取消定时任务
     */
    public void cancel() {
        ScheduledFuture<?> future = this.future;
        if (future != null) {
            future.cancel(true);
        }
    }
}
