feature #I7YYLE 添加组件降级启动配置

This commit is contained in:
Dale Lee
2023-10-01 16:54:35 +08:00
parent 51fe4f5b42
commit 0df89cb9b5
8 changed files with 56 additions and 44 deletions

View File

@@ -46,10 +46,10 @@ public class LiteflowAutoConfiguration {
liteflowConfig.setMainExecutorWorks(property.getMainExecutorWorks());
liteflowConfig.setMainExecutorClass(property.getMainExecutorClass());
liteflowConfig.setPrintExecutionLog(property.isPrintExecutionLog());
liteflowConfig.setSubstituteCmpClass(property.getSubstituteCmpClass());
liteflowConfig.setParallelMaxWorkers(property.getParallelMaxWorkers());
liteflowConfig.setParallelQueueLimit(property.getParallelQueueLimit());
liteflowConfig.setParallelLoopExecutorClass(property.getParallelLoopExecutorClass());
liteflowConfig.setFallbackCmpEnable(property.isFallbackCmpEnable());
return liteflowConfig;
}

View File

@@ -67,9 +67,6 @@ public class LiteflowProperty {
// 是否打印执行过程中的日志
private boolean printExecutionLog;
// 替补组件的class路径
private String substituteCmpClass;
//并行循环线程池类路径
private String parallelLoopExecutorClass;
@@ -78,6 +75,9 @@ public class LiteflowProperty {
//使用默认并行循环线程池时,最大队列数
private Integer parallelQueueLimit;
// 是否启用组件降级
private Boolean fallbackCmpEnable;
public boolean isEnable() {
return enable;
@@ -212,14 +212,6 @@ public class LiteflowProperty {
this.requestIdGeneratorClass = requestIdGeneratorClass;
}
public String getSubstituteCmpClass() {
return substituteCmpClass;
}
public void setSubstituteCmpClass(String substituteCmpClass) {
this.substituteCmpClass = substituteCmpClass;
}
public String getRuleSourceExtData() {
return ruleSourceExtData;
}
@@ -251,4 +243,12 @@ public class LiteflowProperty {
public void setParallelQueueLimit(Integer parallelQueueLimit) {
this.parallelQueueLimit = parallelQueueLimit;
}
public Boolean isFallbackCmpEnable() {
return fallbackCmpEnable;
}
public void setFallbackCmpEnable(Boolean fallbackCmpEnable) {
this.fallbackCmpEnable = fallbackCmpEnable;
}
}