|
@@ -42,6 +42,7 @@ public class LiteflowConfig {
|
|
|
private Integer slotSize;
|
|
|
|
|
|
// 并行线程执行器class路径
|
|
|
+ @Deprecated
|
|
|
private String threadExecutorClass;
|
|
|
|
|
|
// 异步线程最大等待秒数
|
|
@@ -68,9 +69,11 @@ public class LiteflowConfig {
|
|
|
private Long period;
|
|
|
|
|
|
// 异步线程池最大线程数
|
|
|
+ @Deprecated
|
|
|
private Integer whenMaxWorkers;
|
|
|
|
|
|
// 异步线程池最大队列数量
|
|
|
+ @Deprecated
|
|
|
private Integer whenQueueLimit;
|
|
|
|
|
|
// 解析模式,一共有三种,具体看其定义
|
|
@@ -106,12 +109,15 @@ public class LiteflowConfig {
|
|
|
private Boolean enableMonitorFile = Boolean.FALSE;
|
|
|
|
|
|
//并行循环线程池所用class路径
|
|
|
+ @Deprecated
|
|
|
private String parallelLoopExecutorClass;
|
|
|
|
|
|
//使用默认并行循环线程池时,最大线程数
|
|
|
+ @Deprecated
|
|
|
private Integer parallelMaxWorkers;
|
|
|
|
|
|
//使用默认并行循环线程池时,最大队列数
|
|
|
+ @Deprecated
|
|
|
private Integer parallelQueueLimit;
|
|
|
|
|
|
// 是否启用组件降级
|
|
@@ -131,6 +137,15 @@ public class LiteflowConfig {
|
|
|
this.enableMonitorFile = enableMonitorFile;
|
|
|
}
|
|
|
|
|
|
+ //全局线程池所用class路径(when+异步循环)
|
|
|
+ private String globalThreadPoolExecutorClass;
|
|
|
+
|
|
|
+ //全局线程池最大线程数(when+异步循环)
|
|
|
+ private Integer globalThreadPoolSize;
|
|
|
+
|
|
|
+ //全局线程池最大队列数(when+异步循环)
|
|
|
+ private Integer globalThreadPoolQueueSize;
|
|
|
+
|
|
|
public Boolean getEnable() {
|
|
|
if (ObjectUtil.isNull(enable)) {
|
|
|
return Boolean.TRUE;
|
|
@@ -230,6 +245,7 @@ public class LiteflowConfig {
|
|
|
this.enableLog = enableLog;
|
|
|
}
|
|
|
|
|
|
+ @Deprecated
|
|
|
public Integer getWhenMaxWorkers() {
|
|
|
if (ObjectUtil.isNull(whenMaxWorkers)) {
|
|
|
return 16;
|
|
@@ -239,10 +255,13 @@ public class LiteflowConfig {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ @Deprecated
|
|
|
+
|
|
|
public void setWhenMaxWorkers(Integer whenMaxWorkers) {
|
|
|
this.whenMaxWorkers = whenMaxWorkers;
|
|
|
}
|
|
|
|
|
|
+ @Deprecated
|
|
|
public Integer getWhenQueueLimit() {
|
|
|
if (ObjectUtil.isNull(whenQueueLimit)) {
|
|
|
return 512;
|
|
@@ -252,6 +271,7 @@ public class LiteflowConfig {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ @Deprecated
|
|
|
public void setWhenQueueLimit(Integer whenQueueLimit) {
|
|
|
this.whenQueueLimit = whenQueueLimit;
|
|
|
}
|
|
@@ -297,6 +317,7 @@ public class LiteflowConfig {
|
|
|
this.printBanner = printBanner;
|
|
|
}
|
|
|
|
|
|
+ @Deprecated
|
|
|
public String getThreadExecutorClass() {
|
|
|
if (StrUtil.isBlank(threadExecutorClass)) {
|
|
|
return "com.yomahub.liteflow.thread.LiteFlowDefaultWhenExecutorBuilder";
|
|
@@ -306,6 +327,7 @@ public class LiteflowConfig {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ @Deprecated
|
|
|
public void setThreadExecutorClass(String threadExecutorClass) {
|
|
|
this.threadExecutorClass = threadExecutorClass;
|
|
|
}
|
|
@@ -423,6 +445,7 @@ public class LiteflowConfig {
|
|
|
this.parallelMaxWorkers = parallelMaxWorkers;
|
|
|
}
|
|
|
|
|
|
+ @Deprecated
|
|
|
public Integer getParallelQueueLimit() {
|
|
|
if(ObjectUtil.isNull(parallelQueueLimit)){
|
|
|
return 512;
|
|
@@ -431,10 +454,12 @@ public class LiteflowConfig {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ @Deprecated
|
|
|
public void setParallelQueueLimit(Integer parallelQueueLimit) {
|
|
|
this.parallelQueueLimit = parallelQueueLimit;
|
|
|
}
|
|
|
|
|
|
+ @Deprecated
|
|
|
public String getParallelLoopExecutorClass() {
|
|
|
if (StrUtil.isBlank(parallelLoopExecutorClass)) {
|
|
|
return "com.yomahub.liteflow.thread.LiteFlowDefaultParallelLoopExecutorBuilder";
|
|
@@ -443,6 +468,8 @@ public class LiteflowConfig {
|
|
|
return parallelLoopExecutorClass;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ @Deprecated
|
|
|
public void setParallelLoopExecutorClass(String parallelLoopExecutorClass) {
|
|
|
this.parallelLoopExecutorClass = parallelLoopExecutorClass;
|
|
|
}
|
|
@@ -508,4 +535,40 @@ public class LiteflowConfig {
|
|
|
public void setScriptSetting(Map<String, String> scriptSetting) {
|
|
|
this.scriptSetting = scriptSetting;
|
|
|
}
|
|
|
+
|
|
|
+ public Integer getGlobalThreadPoolSize() {
|
|
|
+ if (ObjectUtil.isNull(globalThreadPoolSize)) {
|
|
|
+ return 16;
|
|
|
+ } else {
|
|
|
+ return globalThreadPoolSize;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setGlobalThreadPoolSize(Integer globalThreadPoolSize) {
|
|
|
+ this.globalThreadPoolSize = globalThreadPoolSize;
|
|
|
+ }
|
|
|
+
|
|
|
+ public Integer getGlobalThreadPoolQueueSize() {
|
|
|
+ if (ObjectUtil.isNull(globalThreadPoolQueueSize)) {
|
|
|
+ return 512;
|
|
|
+ } else {
|
|
|
+ return globalThreadPoolQueueSize;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setGlobalThreadPoolQueueSize(Integer globalThreadPoolQueueSize) {
|
|
|
+ this.globalThreadPoolQueueSize = globalThreadPoolQueueSize;
|
|
|
+ }
|
|
|
+
|
|
|
+ public String getGlobalThreadPoolExecutorClass() {
|
|
|
+ if (StrUtil.isBlank(globalThreadPoolExecutorClass)) {
|
|
|
+ return "com.yomahub.liteflow.thread.LiteFlowDefaultGlobalExecutorBuilder";
|
|
|
+ } else {
|
|
|
+ return globalThreadPoolExecutorClass;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setGlobalThreadPoolExecutorClass(String globalThreadPoolExecutorClass) {
|
|
|
+ this.globalThreadPoolExecutorClass = globalThreadPoolExecutorClass;
|
|
|
+ }
|
|
|
}
|