emu
package com.huawei.hwclouds.taskmgr.job.task;
public enum TaskConfigConst {
//Tack重试次数,0表示不进行重试,1表示重试一次,最小0,最大9999
RETRY_COUNT("retryCount", "0", 0, 9999),
//重试次数间隔,默认为5秒,最小5,最大9999
RETRY_INTERVAL_SECS("retryIntervalSecs", "5", 5, 9999),
//第一次listen的延时时间
FIRST_LISTENER_DELAY("firstListenerDelay", "0"),
//Exec 监控延时,默认为5秒,最小5,最大9999
LISTENER_DELAY("listenerDelay", "5", 5, 9999),
LISTENER_COUNT("listenerCount", "9999", 1, 9999),
//是否支持rollback流程
CAN_ROLLBACK("canRollback", "true"),
//第一次listen的延时时间
FIRST_ROLLBACK_LISTENER_DELAY("firstRollBackListenerDelay", "0"),
//Rollback监控延时,默认为5秒,最小5,最大9999
ROLLBACK_LISTENER_DELAY("rollbackListenerDelay", "5", 5, 9999),
//Rollback 重试次数,0表示不进行重试,1表示重试一次,最小0,最大9999
ROLLBACK_RETRY_COUNT("rollbackRetryCount", "0", 0, 9999);
private String name;
private String defaultValue;
private int minValue;
private int maxValue;
public String getName() {
return name;
}
public String getDefaultValue() {
return defaultValue;
}
public int getMinValue() {
return minValue;
}
public int getMaxValue() {
return maxValue;
}
TaskConfigConst(String name, String defaultValue) {
this.name = name;
this.defaultValue = defaultValue;
}
TaskConfigConst(String name, String defaultValue, int minValue, int maxValue) {
this.name = name;
this.defaultValue = defaultValue;
this.minValue = minValue;
this.maxValue = maxValue;
}
}
setTaskConfig(TaskConfigConst.LISTENER_DELAY.getName(), delayKey, defaultDelay, configs);