package cn.reghao.tnb.file.app.zjob;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author reghao
 * @date 2024-12-04 10:49:06
 */
@AllArgsConstructor
@Getter
public class DelayJob {
    private long jobId;
    private String jobName;
    private Runnable job;
    private long delaySecond;
    private long execTime;

    public DelayJob(long jobId, Runnable job, long delaySecond) {
        this.jobId = jobId;
        this.jobName = job.getClass().getSimpleName();
        this.job = job;
        this.delaySecond = delaySecond;
        this.execTime = System.currentTimeMillis() + delaySecond*1000;
    }
}
