enhancement #I3DM92 集成asyncTool作为线程编排的核心

This commit is contained in:
bryan31
2021-11-08 13:50:58 +08:00
parent e84ae73018
commit 89c3d5a42d
13 changed files with 13 additions and 2 deletions

View File

@@ -3,6 +3,7 @@ package com.yomahub.liteflow.asynctool.callback;
import com.yomahub.liteflow.asynctool.worker.WorkResult;
/**
* 代码来自于asyncTool,请参考https://gitee.com/jd-platform-opensource/asyncTool
* 默认回调类,如果不设置的话,会默认给这个回调
* @author wuweifeng wrote on 2019-11-19.
*/

View File

@@ -5,6 +5,7 @@ import com.yomahub.liteflow.asynctool.wrapper.WorkerWrapper;
import java.util.List;
/**
* 代码来自于asyncTool,请参考https://gitee.com/jd-platform-opensource/asyncTool
* @author wuweifeng wrote on 2019-12-27
* @version 1.0
*/

View File

@@ -4,6 +4,7 @@ package com.yomahub.liteflow.asynctool.callback;
import com.yomahub.liteflow.asynctool.worker.WorkResult;
/**
* 代码来自于asyncTool,请参考https://gitee.com/jd-platform-opensource/asyncTool
* 每个执行单元执行完毕后,会回调该接口</p>
* 需要监听执行结果的,实现该接口即可
*

View File

@@ -5,6 +5,7 @@ import com.yomahub.liteflow.asynctool.wrapper.WorkerWrapper;
import java.util.List;
/**
* 代码来自于asyncTool,请参考https://gitee.com/jd-platform-opensource/asyncTool
* 如果是异步执行整组的话,可以用这个组回调。不推荐使用
* @author wuweifeng wrote on 2019-11-19.
*/

View File

@@ -1,6 +1,7 @@
package com.yomahub.liteflow.asynctool.callback;
/**
* 代码来自于asyncTool,请参考https://gitee.com/jd-platform-opensource/asyncTool
* @author wuweifeng wrote on 2019-12-20
* @version 1.0
*/

View File

@@ -5,8 +5,8 @@ import com.yomahub.liteflow.asynctool.wrapper.WorkerWrapper;
import java.util.Map;
/**
* 代码来自于asyncTool,请参考https://gitee.com/jd-platform-opensource/asyncTool
* 每个最小执行单元需要实现该接口
*
* @author wuweifeng wrote on 2019-11-19.
*/
@FunctionalInterface

View File

@@ -1,6 +1,7 @@
package com.yomahub.liteflow.asynctool.exception;
/**
* 代码来自于asyncTool,请参考https://gitee.com/jd-platform-opensource/asyncTool
* 如果任务在执行之前自己后面的任务已经执行完或正在被执行则抛该exception
* @author wuweifeng wrote on 2020-02-18
* @version 1.0

View File

@@ -9,6 +9,7 @@ import java.util.concurrent.*;
import java.util.stream.Collectors;
/**
* 代码来自于asyncTool,请参考https://gitee.com/jd-platform-opensource/asyncTool
* 类入口可以根据自己情况调整core线程的数量
* @author wuweifeng wrote on 2019-12-18
* @version 1.0

View File

@@ -6,6 +6,7 @@ import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicLong;
/**
* 代码来自于asyncTool,请参考https://gitee.com/jd-platform-opensource/asyncTool
* 用于解决高并发下System.currentTimeMillis卡顿
* @author lry
*/

View File

@@ -3,6 +3,7 @@ package com.yomahub.liteflow.asynctool.worker;
import com.yomahub.liteflow.asynctool.wrapper.WorkerWrapper;
/**
* 代码来自于asyncTool,请参考https://gitee.com/jd-platform-opensource/asyncTool
* 对依赖的wrapper的封装
* @author wuweifeng wrote on 2019-12-20
* @version 1.0

View File

@@ -1,6 +1,7 @@
package com.yomahub.liteflow.asynctool.worker;
/**
* 代码来自于asyncTool,请参考https://gitee.com/jd-platform-opensource/asyncTool
* 结果状态
* @author wuweifeng wrote on 2019-11-19.
*/

View File

@@ -1,6 +1,7 @@
package com.yomahub.liteflow.asynctool.worker;
/**
* 代码来自于asyncTool,请参考https://gitee.com/jd-platform-opensource/asyncTool
* 执行结果
*/
public class WorkResult<V> {

View File

@@ -17,8 +17,8 @@ import java.util.concurrent.ExecutorService;
import java.util.concurrent.atomic.AtomicInteger;
/**
* 代码来自于asyncTool,请参考https://gitee.com/jd-platform-opensource/asyncTool
* 对每个worker及callback进行包装一对一
*
* @author wuweifeng wrote on 2019-11-19.
*/
public class WorkerWrapper<T, V> {