mirror of
https://gitee.com/jd-platform-opensource/asyncTool.git
synced 2024-12-31 15:35:34 +08:00
修改包名,设置版本号
This commit is contained in:
parent
7d5cdfaef9
commit
5b1c05032e
2
pom.xml
2
pom.xml
@ -4,7 +4,7 @@
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<groupId>com.tianyalei</groupId>
|
||||
<groupId>com.jd.platform</groupId>
|
||||
<artifactId>asyncTool</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
package com.tianyalei.async.callback;
|
||||
package com.jd.platform.async.callback;
|
||||
|
||||
|
||||
import com.tianyalei.async.worker.WorkResult;
|
||||
import com.jd.platform.async.worker.WorkResult;
|
||||
|
||||
/**
|
||||
* 默认回调类,如果不设置的话,会默认给这个回调
|
@ -1,6 +1,6 @@
|
||||
package com.tianyalei.async.callback;
|
||||
package com.jd.platform.async.callback;
|
||||
|
||||
import com.tianyalei.async.wrapper.WorkerWrapper;
|
||||
import com.jd.platform.async.wrapper.WorkerWrapper;
|
||||
|
||||
import java.util.List;
|
||||
|
@ -1,7 +1,7 @@
|
||||
package com.tianyalei.async.callback;
|
||||
package com.jd.platform.async.callback;
|
||||
|
||||
|
||||
import com.tianyalei.async.worker.WorkResult;
|
||||
import com.jd.platform.async.worker.WorkResult;
|
||||
|
||||
/**
|
||||
* 每个执行单元执行完毕后,会回调该接口</p>
|
@ -1,6 +1,6 @@
|
||||
package com.tianyalei.async.callback;
|
||||
package com.jd.platform.async.callback;
|
||||
|
||||
import com.tianyalei.async.wrapper.WorkerWrapper;
|
||||
import com.jd.platform.async.wrapper.WorkerWrapper;
|
||||
|
||||
import java.util.List;
|
||||
|
@ -1,4 +1,4 @@
|
||||
package com.tianyalei.async.callback;
|
||||
package com.jd.platform.async.callback;
|
||||
|
||||
/**
|
||||
* @author wuweifeng wrote on 2019-12-20
|
@ -1,4 +1,4 @@
|
||||
package com.tianyalei.async.callback;
|
||||
package com.jd.platform.async.callback;
|
||||
|
||||
/**
|
||||
* 每个最小执行单元需要实现该接口
|
@ -1,4 +1,4 @@
|
||||
package com.tianyalei.async.exception;
|
||||
package com.jd.platform.async.exception;
|
||||
|
||||
/**
|
||||
* 如果任务在执行之前,自己后面的任务已经执行完或正在被执行,则抛该exception
|
@ -1,9 +1,9 @@
|
||||
package com.tianyalei.async.executor;
|
||||
package com.jd.platform.async.executor;
|
||||
|
||||
|
||||
import com.tianyalei.async.callback.DefaultGroupCallback;
|
||||
import com.tianyalei.async.callback.IGroupCallback;
|
||||
import com.tianyalei.async.wrapper.WorkerWrapper;
|
||||
import com.jd.platform.async.callback.DefaultGroupCallback;
|
||||
import com.jd.platform.async.callback.IGroupCallback;
|
||||
import com.jd.platform.async.wrapper.WorkerWrapper;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.HashSet;
|
@ -1,4 +1,4 @@
|
||||
package com.tianyalei.async.executor.timer;
|
||||
package com.jd.platform.async.executor.timer;
|
||||
|
||||
import java.util.concurrent.Executors;
|
||||
import java.util.concurrent.ScheduledExecutorService;
|
@ -1,7 +1,7 @@
|
||||
package com.tianyalei.async.worker;
|
||||
package com.jd.platform.async.worker;
|
||||
|
||||
|
||||
import com.tianyalei.async.wrapper.WorkerWrapper;
|
||||
import com.jd.platform.async.wrapper.WorkerWrapper;
|
||||
|
||||
/**
|
||||
* 对依赖的wrapper的封装
|
@ -1,4 +1,4 @@
|
||||
package com.tianyalei.async.worker;
|
||||
package com.jd.platform.async.worker;
|
||||
|
||||
/**
|
||||
* 结果状态
|
@ -1,4 +1,4 @@
|
||||
package com.tianyalei.async.worker;
|
||||
package com.jd.platform.async.worker;
|
||||
|
||||
/**
|
||||
* 执行结果
|
@ -1,4 +1,4 @@
|
||||
package com.tianyalei.async.wrapper;
|
||||
package com.jd.platform.async.wrapper;
|
||||
|
||||
|
||||
import java.util.ArrayList;
|
@ -1,13 +1,13 @@
|
||||
package com.tianyalei.async.wrapper;
|
||||
package com.jd.platform.async.wrapper;
|
||||
|
||||
import com.tianyalei.async.callback.DefaultCallback;
|
||||
import com.tianyalei.async.callback.ICallback;
|
||||
import com.tianyalei.async.callback.IWorker;
|
||||
import com.tianyalei.async.exception.SkippedException;
|
||||
import com.tianyalei.async.executor.timer.SystemClock;
|
||||
import com.tianyalei.async.worker.DependWrapper;
|
||||
import com.tianyalei.async.worker.ResultState;
|
||||
import com.tianyalei.async.worker.WorkResult;
|
||||
import com.jd.platform.async.callback.DefaultCallback;
|
||||
import com.jd.platform.async.callback.ICallback;
|
||||
import com.jd.platform.async.callback.IWorker;
|
||||
import com.jd.platform.async.executor.timer.SystemClock;
|
||||
import com.jd.platform.async.worker.DependWrapper;
|
||||
import com.jd.platform.async.worker.ResultState;
|
||||
import com.jd.platform.async.exception.SkippedException;
|
||||
import com.jd.platform.async.worker.WorkResult;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashSet;
|
@ -1,10 +1,9 @@
|
||||
package com.tianyalei.test.depend;
|
||||
package com.jd.platform.test.depend;
|
||||
|
||||
|
||||
import com.tianyalei.async.callback.ICallback;
|
||||
import com.tianyalei.async.callback.IWorker;
|
||||
import com.tianyalei.async.executor.timer.SystemClock;
|
||||
import com.tianyalei.async.worker.WorkResult;
|
||||
import com.jd.platform.async.callback.ICallback;
|
||||
import com.jd.platform.async.callback.IWorker;
|
||||
import com.jd.platform.async.worker.WorkResult;
|
||||
|
||||
/**
|
||||
* @author wuweifeng wrote on 2019-11-20.
|
@ -1,9 +1,9 @@
|
||||
package com.tianyalei.test.depend;
|
||||
package com.jd.platform.test.depend;
|
||||
|
||||
|
||||
import com.tianyalei.async.callback.ICallback;
|
||||
import com.tianyalei.async.callback.IWorker;
|
||||
import com.tianyalei.async.worker.WorkResult;
|
||||
import com.jd.platform.async.callback.ICallback;
|
||||
import com.jd.platform.async.callback.IWorker;
|
||||
import com.jd.platform.async.worker.WorkResult;
|
||||
|
||||
/**
|
||||
* @author wuweifeng wrote on 2019-11-20.
|
@ -1,9 +1,9 @@
|
||||
package com.tianyalei.test.depend;
|
||||
package com.jd.platform.test.depend;
|
||||
|
||||
|
||||
import com.tianyalei.async.callback.ICallback;
|
||||
import com.tianyalei.async.callback.IWorker;
|
||||
import com.tianyalei.async.worker.WorkResult;
|
||||
import com.jd.platform.async.callback.ICallback;
|
||||
import com.jd.platform.async.callback.IWorker;
|
||||
import com.jd.platform.async.worker.WorkResult;
|
||||
|
||||
/**
|
||||
* @author wuweifeng wrote on 2019-11-20.
|
@ -1,8 +1,8 @@
|
||||
package com.tianyalei.test.depend;
|
||||
package com.jd.platform.test.depend;
|
||||
|
||||
import com.tianyalei.async.executor.Async;
|
||||
import com.tianyalei.async.wrapper.WorkerWrapper;
|
||||
import com.tianyalei.async.worker.WorkResult;
|
||||
import com.jd.platform.async.executor.Async;
|
||||
import com.jd.platform.async.wrapper.WorkerWrapper;
|
||||
import com.jd.platform.async.worker.WorkResult;
|
||||
|
||||
import java.util.concurrent.ExecutionException;
|
||||
|
@ -1,4 +1,4 @@
|
||||
package com.tianyalei.test.depend;
|
||||
package com.jd.platform.test.depend;
|
||||
|
||||
/**
|
||||
* 一个包装类
|
@ -1,10 +1,10 @@
|
||||
package com.tianyalei.test.parallel;
|
||||
package com.jd.platform.test.parallel;
|
||||
|
||||
|
||||
import com.tianyalei.async.callback.ICallback;
|
||||
import com.tianyalei.async.callback.IWorker;
|
||||
import com.tianyalei.async.executor.timer.SystemClock;
|
||||
import com.tianyalei.async.worker.WorkResult;
|
||||
import com.jd.platform.async.callback.ICallback;
|
||||
import com.jd.platform.async.callback.IWorker;
|
||||
import com.jd.platform.async.executor.timer.SystemClock;
|
||||
import com.jd.platform.async.worker.WorkResult;
|
||||
|
||||
/**
|
||||
* @author wuweifeng wrote on 2019-11-20.
|
@ -1,10 +1,10 @@
|
||||
package com.tianyalei.test.parallel;
|
||||
package com.jd.platform.test.parallel;
|
||||
|
||||
|
||||
import com.tianyalei.async.callback.ICallback;
|
||||
import com.tianyalei.async.callback.IWorker;
|
||||
import com.tianyalei.async.executor.timer.SystemClock;
|
||||
import com.tianyalei.async.worker.WorkResult;
|
||||
import com.jd.platform.async.callback.ICallback;
|
||||
import com.jd.platform.async.callback.IWorker;
|
||||
import com.jd.platform.async.executor.timer.SystemClock;
|
||||
import com.jd.platform.async.worker.WorkResult;
|
||||
|
||||
/**
|
||||
* @author wuweifeng wrote on 2019-11-20.
|
@ -1,10 +1,10 @@
|
||||
package com.tianyalei.test.parallel;
|
||||
package com.jd.platform.test.parallel;
|
||||
|
||||
|
||||
import com.tianyalei.async.callback.ICallback;
|
||||
import com.tianyalei.async.callback.IWorker;
|
||||
import com.tianyalei.async.executor.timer.SystemClock;
|
||||
import com.tianyalei.async.worker.WorkResult;
|
||||
import com.jd.platform.async.callback.ICallback;
|
||||
import com.jd.platform.async.callback.IWorker;
|
||||
import com.jd.platform.async.executor.timer.SystemClock;
|
||||
import com.jd.platform.async.worker.WorkResult;
|
||||
|
||||
/**
|
||||
* @author wuweifeng wrote on 2019-11-20.
|
@ -1,10 +1,10 @@
|
||||
package com.tianyalei.test.parallel;
|
||||
package com.jd.platform.test.parallel;
|
||||
|
||||
|
||||
import com.tianyalei.async.callback.ICallback;
|
||||
import com.tianyalei.async.callback.IWorker;
|
||||
import com.tianyalei.async.executor.timer.SystemClock;
|
||||
import com.tianyalei.async.worker.WorkResult;
|
||||
import com.jd.platform.async.callback.ICallback;
|
||||
import com.jd.platform.async.callback.IWorker;
|
||||
import com.jd.platform.async.executor.timer.SystemClock;
|
||||
import com.jd.platform.async.worker.WorkResult;
|
||||
|
||||
/**
|
||||
* @author wuweifeng wrote on 2019-11-20.
|
@ -1,10 +1,10 @@
|
||||
package com.tianyalei.test.parallel;
|
||||
package com.jd.platform.test.parallel;
|
||||
|
||||
|
||||
import com.tianyalei.async.callback.ICallback;
|
||||
import com.tianyalei.async.callback.IWorker;
|
||||
import com.tianyalei.async.executor.timer.SystemClock;
|
||||
import com.tianyalei.async.worker.WorkResult;
|
||||
import com.jd.platform.async.callback.ICallback;
|
||||
import com.jd.platform.async.callback.IWorker;
|
||||
import com.jd.platform.async.executor.timer.SystemClock;
|
||||
import com.jd.platform.async.worker.WorkResult;
|
||||
|
||||
/**
|
||||
* @author wuweifeng wrote on 2019-11-20.
|
@ -1,10 +1,10 @@
|
||||
package com.tianyalei.test.parallel;
|
||||
package com.jd.platform.test.parallel;
|
||||
|
||||
|
||||
import com.tianyalei.async.callback.ICallback;
|
||||
import com.tianyalei.async.callback.IWorker;
|
||||
import com.tianyalei.async.executor.timer.SystemClock;
|
||||
import com.tianyalei.async.worker.WorkResult;
|
||||
import com.jd.platform.async.callback.ICallback;
|
||||
import com.jd.platform.async.callback.IWorker;
|
||||
import com.jd.platform.async.executor.timer.SystemClock;
|
||||
import com.jd.platform.async.worker.WorkResult;
|
||||
|
||||
/**
|
||||
* @author wuweifeng wrote on 2019-11-20.
|
@ -1,14 +1,12 @@
|
||||
package com.tianyalei.test.parallel;
|
||||
package com.jd.platform.test.parallel;
|
||||
|
||||
|
||||
import com.tianyalei.async.executor.Async;
|
||||
import com.tianyalei.async.executor.timer.SystemClock;
|
||||
import com.tianyalei.async.wrapper.WorkerWrapper;
|
||||
import com.jd.platform.async.executor.Async;
|
||||
import com.jd.platform.async.executor.timer.SystemClock;
|
||||
import com.jd.platform.async.wrapper.WorkerWrapper;
|
||||
|
||||
import java.util.concurrent.ExecutionException;
|
||||
|
||||
import static com.tianyalei.async.executor.Async.getThreadCount;
|
||||
|
||||
/**
|
||||
* 并行测试
|
||||
*
|
||||
@ -52,7 +50,7 @@ public class TestPar {
|
||||
|
||||
System.out.println("end-" + SystemClock.now());
|
||||
System.err.println("cost-" + (SystemClock.now() - now));
|
||||
System.out.println(getThreadCount());
|
||||
System.out.println(Async.getThreadCount());
|
||||
|
||||
System.out.println(workerWrapper.getWorkResult());
|
||||
// System.out.println(getThreadCount());
|
||||
@ -170,7 +168,7 @@ public class TestPar {
|
||||
System.out.println("end-" + SystemClock.now());
|
||||
System.err.println("cost-" + (SystemClock.now() - now));
|
||||
|
||||
System.out.println(getThreadCount());
|
||||
System.out.println(Async.getThreadCount());
|
||||
Async.shutDown();
|
||||
}
|
||||
|
||||
@ -209,7 +207,7 @@ public class TestPar {
|
||||
System.out.println("end-" + SystemClock.now());
|
||||
System.err.println("cost-" + (SystemClock.now() - now));
|
||||
|
||||
System.out.println(getThreadCount());
|
||||
System.out.println(Async.getThreadCount());
|
||||
Async.shutDown();
|
||||
}
|
||||
|
||||
@ -250,7 +248,7 @@ public class TestPar {
|
||||
System.out.println("end-" + SystemClock.now());
|
||||
System.err.println("cost-" + (SystemClock.now() - now));
|
||||
|
||||
System.out.println(getThreadCount());
|
||||
System.out.println(Async.getThreadCount());
|
||||
Async.shutDown();
|
||||
}
|
||||
|
||||
@ -292,7 +290,7 @@ public class TestPar {
|
||||
System.out.println("end-" + SystemClock.now());
|
||||
System.err.println("cost-" + (SystemClock.now() - now));
|
||||
|
||||
System.out.println(getThreadCount());
|
||||
System.out.println(Async.getThreadCount());
|
||||
Async.shutDown();
|
||||
}
|
||||
|
||||
@ -351,7 +349,7 @@ public class TestPar {
|
||||
System.out.println("end-" + SystemClock.now());
|
||||
System.err.println("cost-" + (SystemClock.now() - now));
|
||||
|
||||
System.out.println(getThreadCount());
|
||||
System.out.println(Async.getThreadCount());
|
||||
Async.shutDown();
|
||||
}
|
||||
|
@ -1,10 +1,10 @@
|
||||
package com.tianyalei.test.seq;
|
||||
package com.jd.platform.test.seq;
|
||||
|
||||
|
||||
import com.tianyalei.async.callback.ICallback;
|
||||
import com.tianyalei.async.callback.IWorker;
|
||||
import com.tianyalei.async.executor.timer.SystemClock;
|
||||
import com.tianyalei.async.worker.WorkResult;
|
||||
import com.jd.platform.async.callback.ICallback;
|
||||
import com.jd.platform.async.callback.IWorker;
|
||||
import com.jd.platform.async.executor.timer.SystemClock;
|
||||
import com.jd.platform.async.worker.WorkResult;
|
||||
|
||||
/**
|
||||
* @author wuweifeng wrote on 2019-11-20.
|
@ -1,10 +1,10 @@
|
||||
package com.tianyalei.test.seq;
|
||||
package com.jd.platform.test.seq;
|
||||
|
||||
|
||||
import com.tianyalei.async.callback.ICallback;
|
||||
import com.tianyalei.async.callback.IWorker;
|
||||
import com.tianyalei.async.executor.timer.SystemClock;
|
||||
import com.tianyalei.async.worker.WorkResult;
|
||||
import com.jd.platform.async.callback.ICallback;
|
||||
import com.jd.platform.async.callback.IWorker;
|
||||
import com.jd.platform.async.executor.timer.SystemClock;
|
||||
import com.jd.platform.async.worker.WorkResult;
|
||||
|
||||
/**
|
||||
* @author wuweifeng wrote on 2019-11-20.
|
@ -1,10 +1,10 @@
|
||||
package com.tianyalei.test.seq;
|
||||
package com.jd.platform.test.seq;
|
||||
|
||||
|
||||
import com.tianyalei.async.callback.ICallback;
|
||||
import com.tianyalei.async.callback.IWorker;
|
||||
import com.tianyalei.async.executor.timer.SystemClock;
|
||||
import com.tianyalei.async.worker.WorkResult;
|
||||
import com.jd.platform.async.callback.ICallback;
|
||||
import com.jd.platform.async.callback.IWorker;
|
||||
import com.jd.platform.async.executor.timer.SystemClock;
|
||||
import com.jd.platform.async.worker.WorkResult;
|
||||
|
||||
/**
|
||||
* @author wuweifeng wrote on 2019-11-20.
|
@ -1,10 +1,10 @@
|
||||
package com.tianyalei.test.seq;
|
||||
package com.jd.platform.test.seq;
|
||||
|
||||
|
||||
import com.tianyalei.async.callback.ICallback;
|
||||
import com.tianyalei.async.callback.IWorker;
|
||||
import com.tianyalei.async.executor.timer.SystemClock;
|
||||
import com.tianyalei.async.worker.WorkResult;
|
||||
import com.jd.platform.async.callback.ICallback;
|
||||
import com.jd.platform.async.callback.IWorker;
|
||||
import com.jd.platform.async.executor.timer.SystemClock;
|
||||
import com.jd.platform.async.worker.WorkResult;
|
||||
|
||||
/**
|
||||
* @author wuweifeng wrote on 2019-11-20.
|
@ -1,9 +1,9 @@
|
||||
package com.tianyalei.test.seq;
|
||||
package com.jd.platform.test.seq;
|
||||
|
||||
|
||||
import com.tianyalei.async.executor.Async;
|
||||
import com.tianyalei.async.executor.timer.SystemClock;
|
||||
import com.tianyalei.async.wrapper.WorkerWrapper;
|
||||
import com.jd.platform.async.executor.Async;
|
||||
import com.jd.platform.async.executor.timer.SystemClock;
|
||||
import com.jd.platform.async.wrapper.WorkerWrapper;
|
||||
|
||||
import java.util.concurrent.ExecutionException;
|
||||
|
@ -1,9 +1,9 @@
|
||||
package com.tianyalei.test.seq;
|
||||
package com.jd.platform.test.seq;
|
||||
|
||||
|
||||
import com.tianyalei.async.executor.Async;
|
||||
import com.tianyalei.async.executor.timer.SystemClock;
|
||||
import com.tianyalei.async.wrapper.WorkerWrapper;
|
||||
import com.jd.platform.async.executor.Async;
|
||||
import com.jd.platform.async.executor.timer.SystemClock;
|
||||
import com.jd.platform.async.wrapper.WorkerWrapper;
|
||||
|
||||
import java.util.concurrent.ExecutionException;
|
||||
|
Loading…
Reference in New Issue
Block a user