package com.ozs.da.constant;

/**
 * @author 许明
 * on 2019/3/6.
 * @version 2.0.0
 * 常量类
 */
public class Constant {

    /************* 返回结果值 ***************/
    public final static int RETURN_FAILD = -1;
    public final static int RETURN_OK = 0;

    /******** job周期类型 **********/
    public final static int JOB_PERIOD_CUSTOM  = 0;// 自定义
    public final static int JOB_PERIOD_MONTH = 1;// 月
    public final static int JOB_PERIOD_DAY = 2;// 日
    public final static int JOB_PERIOD_HOUR = 3;// 时
    public final static int JOB_PERIOD_MINUTE = 4;// 分
    public final static int JOB_PERIOD_SECONDS = 5;// 秒
    public final static int JOB_PERIOD_WEEK = 6;// 周


    public final static int JOB_PERIOD_YEAR = 8;// 年

    /************* 后台线程池名称 ***************/
    public final static String MODULE_MANGER_RESIDENT = "MangerResidentPool";// 后台管理进程常驻任务线程池
    public final static String MODULE_MANGER_TMP = "MangerTmpPool";// 后台管理进程临时任务线程池（执行完成退出）
    public final static String MODULE_MANGER_TIMING = "MangerTimingPool";// 后台管理进程定时任务总线程池
    public final static int MODULE_MANAGER_TIMMING_NUM = 2;// 后台管理进程定时任务总线程池执行个数*CPU
    public final static String MODULE_SCHEDULE_TIMING = "ScheduleTimingPool";// 后台调度进程定时任务总线程池
    public final static int MODULE_SCHEDULE_TIMING_NUM = 2;// 后台调度进程定时任务总线程池执行个数*CPU
    public final static String MODULE_JOB_LOG_TO_HIS = "JobLogToHis";// 日志转移历史表

    public final static int SCHEDU_JOBCONDITION_JUDGE_NUM = 4;// 调度轮询条件判断线程数
    public final static int SCHEDU_JOBPARSE_NUM = 4;// 调度job解析线程数
    public final static int SCHEDU_NODE_EXEJUDGE_NUM = 4;// job任务可执行判断线程数

    public final static long THREAD_SCANJOB_INTERVAL = 24 * 3600000L;// 一天

    /******* job不进入轮询原因 ***********/
    public final static int JOB_LOOP_OVERTIME = 1;// job结束时间超过当前时间不进行轮询
    public final static int JOB_CONF_ERROR = 2;// job信息配置错误
    public final static int JOB_PERIOD_RUN = 3;// 周期类型的job正在执行
    public final static int JOB_RUN_ERROR = 4;// job执行node出错

    public final static String FORMAT_MONTH = "yyyyMM";
    public final static String FORMAT_WEEK = "yyyyMMdd";
    public final static String FORMAT_DAY = "yyyyMMdd";
    public final static String FORMAT_HOUR = "yyyyMMddHH";
    public final static String FORMAT_MINUTE = "yyyyMMddHHmm";
    public final static String FORMAT_SECONDS = "yyyyMMddHHmmss";
    public final static String FORMAT_DATE = "HHmmss";

    public final static String RE_FORMAT_YEAR = "yyyy";
    public final static String RE_FORMAT_MONTH = "yyyy-MM";
    public final static String RE_FORMAT_WEEK = "yyyy-MM-dd";
    public final static String RE_FORMAT_DAY = "yyyy-MM-dd";
    public final static String RE_FORMAT_HOUR = "yyyy-MM-dd HH";
    public final static String RE_FORMAT_MINUTE = "yyyy-MM-dd HH:mm";
    public final static String RE_FORMAT_SECONDS = "yyyy-MM-dd HH:mm:ss";
    public final static String RE_FORMAT_DATE = "HH:mm:ss";
}
