package cn.reghao.autodop.dmaster.monitor;

import lombok.Getter;
import lombok.Setter;

/**
 * 监控任务
 *
 * @author reghao
 * @date 2021-06-23 20:50:41
 */
@Getter
@Setter
public class MonitorJob {
    private String jobId;
    private String jobClassName;
    private String jobType;
    private String cronExp;
    private Boolean enable;
    // 已通知次数
    private Integer notifyCount;
    // 最大通知次数
    private Integer maxNotifyCount;

    public MonitorJob(String jobId, String jobClassName, String jobType) {
        this.jobId = jobId;
        this.jobClassName = jobClassName;
        this.jobType = jobType;
        this.cronExp = "0/10 * * * * ?";
        this.enable = false;
        this.notifyCount = 0;
        this.maxNotifyCount = 3;
    }
}
