diff --git a/pom.xml b/pom.xml index 0853525..ebae0e3 100644 --- a/pom.xml +++ b/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"> 4.0.0 - com.tianyalei + com.jd.platform asyncTool 1.0-SNAPSHOT diff --git a/src/main/java/com/tianyalei/async/callback/DefaultCallback.java b/src/main/java/com/jd/platform/async/callback/DefaultCallback.java similarity index 79% rename from src/main/java/com/tianyalei/async/callback/DefaultCallback.java rename to src/main/java/com/jd/platform/async/callback/DefaultCallback.java index 055c12c..42a3af9 100755 --- a/src/main/java/com/tianyalei/async/callback/DefaultCallback.java +++ b/src/main/java/com/jd/platform/async/callback/DefaultCallback.java @@ -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; /** * 默认回调类,如果不设置的话,会默认给这个回调 diff --git a/src/main/java/com/tianyalei/async/callback/DefaultGroupCallback.java b/src/main/java/com/jd/platform/async/callback/DefaultGroupCallback.java similarity index 78% rename from src/main/java/com/tianyalei/async/callback/DefaultGroupCallback.java rename to src/main/java/com/jd/platform/async/callback/DefaultGroupCallback.java index 94dc3ca..b9485d3 100644 --- a/src/main/java/com/tianyalei/async/callback/DefaultGroupCallback.java +++ b/src/main/java/com/jd/platform/async/callback/DefaultGroupCallback.java @@ -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; diff --git a/src/main/java/com/tianyalei/async/callback/ICallback.java b/src/main/java/com/jd/platform/async/callback/ICallback.java similarity index 81% rename from src/main/java/com/tianyalei/async/callback/ICallback.java rename to src/main/java/com/jd/platform/async/callback/ICallback.java index e9e2b7e..b77189d 100755 --- a/src/main/java/com/tianyalei/async/callback/ICallback.java +++ b/src/main/java/com/jd/platform/async/callback/ICallback.java @@ -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; /** * 每个执行单元执行完毕后,会回调该接口

diff --git a/src/main/java/com/tianyalei/async/callback/IGroupCallback.java b/src/main/java/com/jd/platform/async/callback/IGroupCallback.java similarity index 83% rename from src/main/java/com/tianyalei/async/callback/IGroupCallback.java rename to src/main/java/com/jd/platform/async/callback/IGroupCallback.java index ce65688..02880b4 100755 --- a/src/main/java/com/tianyalei/async/callback/IGroupCallback.java +++ b/src/main/java/com/jd/platform/async/callback/IGroupCallback.java @@ -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; diff --git a/src/main/java/com/tianyalei/async/callback/ITimeoutWorker.java b/src/main/java/com/jd/platform/async/callback/ITimeoutWorker.java similarity index 93% rename from src/main/java/com/tianyalei/async/callback/ITimeoutWorker.java rename to src/main/java/com/jd/platform/async/callback/ITimeoutWorker.java index fd6b71b..be5e7ec 100644 --- a/src/main/java/com/tianyalei/async/callback/ITimeoutWorker.java +++ b/src/main/java/com/jd/platform/async/callback/ITimeoutWorker.java @@ -1,4 +1,4 @@ -package com.tianyalei.async.callback; +package com.jd.platform.async.callback; /** * @author wuweifeng wrote on 2019-12-20 diff --git a/src/main/java/com/tianyalei/async/callback/IWorker.java b/src/main/java/com/jd/platform/async/callback/IWorker.java similarity index 90% rename from src/main/java/com/tianyalei/async/callback/IWorker.java rename to src/main/java/com/jd/platform/async/callback/IWorker.java index b281d03..589f591 100755 --- a/src/main/java/com/tianyalei/async/callback/IWorker.java +++ b/src/main/java/com/jd/platform/async/callback/IWorker.java @@ -1,4 +1,4 @@ -package com.tianyalei.async.callback; +package com.jd.platform.async.callback; /** * 每个最小执行单元需要实现该接口 diff --git a/src/main/java/com/tianyalei/async/exception/SkippedException.java b/src/main/java/com/jd/platform/async/exception/SkippedException.java similarity index 89% rename from src/main/java/com/tianyalei/async/exception/SkippedException.java rename to src/main/java/com/jd/platform/async/exception/SkippedException.java index 8e6aec8..807e8ec 100644 --- a/src/main/java/com/tianyalei/async/exception/SkippedException.java +++ b/src/main/java/com/jd/platform/async/exception/SkippedException.java @@ -1,4 +1,4 @@ -package com.tianyalei.async.exception; +package com.jd.platform.async.exception; /** * 如果任务在执行之前,自己后面的任务已经执行完或正在被执行,则抛该exception diff --git a/src/main/java/com/tianyalei/async/executor/Async.java b/src/main/java/com/jd/platform/async/executor/Async.java similarity index 94% rename from src/main/java/com/tianyalei/async/executor/Async.java rename to src/main/java/com/jd/platform/async/executor/Async.java index 9a456f7..ee2c4e6 100644 --- a/src/main/java/com/tianyalei/async/executor/Async.java +++ b/src/main/java/com/jd/platform/async/executor/Async.java @@ -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; diff --git a/src/main/java/com/tianyalei/async/executor/timer/SystemClock.java b/src/main/java/com/jd/platform/async/executor/timer/SystemClock.java similarity index 97% rename from src/main/java/com/tianyalei/async/executor/timer/SystemClock.java rename to src/main/java/com/jd/platform/async/executor/timer/SystemClock.java index 3d1a1d2..12052f1 100644 --- a/src/main/java/com/tianyalei/async/executor/timer/SystemClock.java +++ b/src/main/java/com/jd/platform/async/executor/timer/SystemClock.java @@ -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; diff --git a/src/main/java/com/tianyalei/async/worker/DependWrapper.java b/src/main/java/com/jd/platform/async/worker/DependWrapper.java similarity index 93% rename from src/main/java/com/tianyalei/async/worker/DependWrapper.java rename to src/main/java/com/jd/platform/async/worker/DependWrapper.java index cb2d4ca..4841c2b 100644 --- a/src/main/java/com/tianyalei/async/worker/DependWrapper.java +++ b/src/main/java/com/jd/platform/async/worker/DependWrapper.java @@ -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的封装 diff --git a/src/main/java/com/tianyalei/async/worker/ResultState.java b/src/main/java/com/jd/platform/async/worker/ResultState.java similarity index 81% rename from src/main/java/com/tianyalei/async/worker/ResultState.java rename to src/main/java/com/jd/platform/async/worker/ResultState.java index c6208a2..ce4ca56 100755 --- a/src/main/java/com/tianyalei/async/worker/ResultState.java +++ b/src/main/java/com/jd/platform/async/worker/ResultState.java @@ -1,4 +1,4 @@ -package com.tianyalei.async.worker; +package com.jd.platform.async.worker; /** * 结果状态 diff --git a/src/main/java/com/tianyalei/async/worker/WorkResult.java b/src/main/java/com/jd/platform/async/worker/WorkResult.java similarity index 97% rename from src/main/java/com/tianyalei/async/worker/WorkResult.java rename to src/main/java/com/jd/platform/async/worker/WorkResult.java index 0fe36ee..95e5868 100755 --- a/src/main/java/com/tianyalei/async/worker/WorkResult.java +++ b/src/main/java/com/jd/platform/async/worker/WorkResult.java @@ -1,4 +1,4 @@ -package com.tianyalei.async.worker; +package com.jd.platform.async.worker; /** * 执行结果 diff --git a/src/main/java/com/tianyalei/async/wrapper/WorkerGroup.java b/src/main/java/com/jd/platform/async/wrapper/WorkerGroup.java similarity index 98% rename from src/main/java/com/tianyalei/async/wrapper/WorkerGroup.java rename to src/main/java/com/jd/platform/async/wrapper/WorkerGroup.java index f200bbc..239af0d 100755 --- a/src/main/java/com/tianyalei/async/wrapper/WorkerGroup.java +++ b/src/main/java/com/jd/platform/async/wrapper/WorkerGroup.java @@ -1,4 +1,4 @@ -package com.tianyalei.async.wrapper; +package com.jd.platform.async.wrapper; import java.util.ArrayList; diff --git a/src/main/java/com/tianyalei/async/wrapper/WorkerWrapper.java b/src/main/java/com/jd/platform/async/wrapper/WorkerWrapper.java similarity index 97% rename from src/main/java/com/tianyalei/async/wrapper/WorkerWrapper.java rename to src/main/java/com/jd/platform/async/wrapper/WorkerWrapper.java index fac5fd6..9cc59ec 100755 --- a/src/main/java/com/tianyalei/async/wrapper/WorkerWrapper.java +++ b/src/main/java/com/jd/platform/async/wrapper/WorkerWrapper.java @@ -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; diff --git a/src/main/java/com/tianyalei/test/depend/DeWorker.java b/src/main/java/com/jd/platform/test/depend/DeWorker.java similarity index 77% rename from src/main/java/com/tianyalei/test/depend/DeWorker.java rename to src/main/java/com/jd/platform/test/depend/DeWorker.java index a23f67d..9ff39de 100755 --- a/src/main/java/com/tianyalei/test/depend/DeWorker.java +++ b/src/main/java/com/jd/platform/test/depend/DeWorker.java @@ -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. diff --git a/src/main/java/com/tianyalei/test/depend/DeWorker1.java b/src/main/java/com/jd/platform/test/depend/DeWorker1.java similarity index 83% rename from src/main/java/com/tianyalei/test/depend/DeWorker1.java rename to src/main/java/com/jd/platform/test/depend/DeWorker1.java index e356848..e0747b2 100755 --- a/src/main/java/com/tianyalei/test/depend/DeWorker1.java +++ b/src/main/java/com/jd/platform/test/depend/DeWorker1.java @@ -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. diff --git a/src/main/java/com/tianyalei/test/depend/DeWorker2.java b/src/main/java/com/jd/platform/test/depend/DeWorker2.java similarity index 83% rename from src/main/java/com/tianyalei/test/depend/DeWorker2.java rename to src/main/java/com/jd/platform/test/depend/DeWorker2.java index 4e5709f..affc748 100755 --- a/src/main/java/com/tianyalei/test/depend/DeWorker2.java +++ b/src/main/java/com/jd/platform/test/depend/DeWorker2.java @@ -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. diff --git a/src/main/java/com/tianyalei/test/depend/Test.java b/src/main/java/com/jd/platform/test/depend/Test.java similarity index 86% rename from src/main/java/com/tianyalei/test/depend/Test.java rename to src/main/java/com/jd/platform/test/depend/Test.java index 1ce7de9..c196929 100644 --- a/src/main/java/com/tianyalei/test/depend/Test.java +++ b/src/main/java/com/jd/platform/test/depend/Test.java @@ -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; diff --git a/src/main/java/com/tianyalei/test/depend/User.java b/src/main/java/com/jd/platform/test/depend/User.java similarity index 92% rename from src/main/java/com/tianyalei/test/depend/User.java rename to src/main/java/com/jd/platform/test/depend/User.java index b0be501..d44bc8e 100644 --- a/src/main/java/com/tianyalei/test/depend/User.java +++ b/src/main/java/com/jd/platform/test/depend/User.java @@ -1,4 +1,4 @@ -package com.tianyalei.test.depend; +package com.jd.platform.test.depend; /** * 一个包装类 diff --git a/src/main/java/com/tianyalei/test/parallel/ParTimeoutWorker.java b/src/main/java/com/jd/platform/test/parallel/ParTimeoutWorker.java similarity index 83% rename from src/main/java/com/tianyalei/test/parallel/ParTimeoutWorker.java rename to src/main/java/com/jd/platform/test/parallel/ParTimeoutWorker.java index 956dff3..95c7ea7 100755 --- a/src/main/java/com/tianyalei/test/parallel/ParTimeoutWorker.java +++ b/src/main/java/com/jd/platform/test/parallel/ParTimeoutWorker.java @@ -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. diff --git a/src/main/java/com/tianyalei/test/parallel/ParWorker.java b/src/main/java/com/jd/platform/test/parallel/ParWorker.java similarity index 83% rename from src/main/java/com/tianyalei/test/parallel/ParWorker.java rename to src/main/java/com/jd/platform/test/parallel/ParWorker.java index c298078..0cc1384 100755 --- a/src/main/java/com/tianyalei/test/parallel/ParWorker.java +++ b/src/main/java/com/jd/platform/test/parallel/ParWorker.java @@ -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. diff --git a/src/main/java/com/tianyalei/test/parallel/ParWorker1.java b/src/main/java/com/jd/platform/test/parallel/ParWorker1.java similarity index 84% rename from src/main/java/com/tianyalei/test/parallel/ParWorker1.java rename to src/main/java/com/jd/platform/test/parallel/ParWorker1.java index 1ba30a9..55abcdd 100755 --- a/src/main/java/com/tianyalei/test/parallel/ParWorker1.java +++ b/src/main/java/com/jd/platform/test/parallel/ParWorker1.java @@ -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. diff --git a/src/main/java/com/tianyalei/test/parallel/ParWorker2.java b/src/main/java/com/jd/platform/test/parallel/ParWorker2.java similarity index 84% rename from src/main/java/com/tianyalei/test/parallel/ParWorker2.java rename to src/main/java/com/jd/platform/test/parallel/ParWorker2.java index a6f1051..1f4565d 100755 --- a/src/main/java/com/tianyalei/test/parallel/ParWorker2.java +++ b/src/main/java/com/jd/platform/test/parallel/ParWorker2.java @@ -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. diff --git a/src/main/java/com/tianyalei/test/parallel/ParWorker3.java b/src/main/java/com/jd/platform/test/parallel/ParWorker3.java similarity index 84% rename from src/main/java/com/tianyalei/test/parallel/ParWorker3.java rename to src/main/java/com/jd/platform/test/parallel/ParWorker3.java index b8187ca..1215a8b 100755 --- a/src/main/java/com/tianyalei/test/parallel/ParWorker3.java +++ b/src/main/java/com/jd/platform/test/parallel/ParWorker3.java @@ -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. diff --git a/src/main/java/com/tianyalei/test/parallel/ParWorker4.java b/src/main/java/com/jd/platform/test/parallel/ParWorker4.java similarity index 83% rename from src/main/java/com/tianyalei/test/parallel/ParWorker4.java rename to src/main/java/com/jd/platform/test/parallel/ParWorker4.java index 07b8657..934fd54 100755 --- a/src/main/java/com/tianyalei/test/parallel/ParWorker4.java +++ b/src/main/java/com/jd/platform/test/parallel/ParWorker4.java @@ -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. diff --git a/src/main/java/com/tianyalei/test/parallel/TestPar.java b/src/main/java/com/jd/platform/test/parallel/TestPar.java similarity index 96% rename from src/main/java/com/tianyalei/test/parallel/TestPar.java rename to src/main/java/com/jd/platform/test/parallel/TestPar.java index 3ab363d..08b0388 100755 --- a/src/main/java/com/tianyalei/test/parallel/TestPar.java +++ b/src/main/java/com/jd/platform/test/parallel/TestPar.java @@ -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(); } diff --git a/src/main/java/com/tianyalei/test/seq/SeqTimeoutWorker.java b/src/main/java/com/jd/platform/test/seq/SeqTimeoutWorker.java similarity index 83% rename from src/main/java/com/tianyalei/test/seq/SeqTimeoutWorker.java rename to src/main/java/com/jd/platform/test/seq/SeqTimeoutWorker.java index 46da8a4..da26492 100755 --- a/src/main/java/com/tianyalei/test/seq/SeqTimeoutWorker.java +++ b/src/main/java/com/jd/platform/test/seq/SeqTimeoutWorker.java @@ -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. diff --git a/src/main/java/com/tianyalei/test/seq/SeqWorker.java b/src/main/java/com/jd/platform/test/seq/SeqWorker.java similarity index 83% rename from src/main/java/com/tianyalei/test/seq/SeqWorker.java rename to src/main/java/com/jd/platform/test/seq/SeqWorker.java index 60b3a80..56db37d 100755 --- a/src/main/java/com/tianyalei/test/seq/SeqWorker.java +++ b/src/main/java/com/jd/platform/test/seq/SeqWorker.java @@ -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. diff --git a/src/main/java/com/tianyalei/test/seq/SeqWorker1.java b/src/main/java/com/jd/platform/test/seq/SeqWorker1.java similarity index 83% rename from src/main/java/com/tianyalei/test/seq/SeqWorker1.java rename to src/main/java/com/jd/platform/test/seq/SeqWorker1.java index 83ac1a6..4beae39 100755 --- a/src/main/java/com/tianyalei/test/seq/SeqWorker1.java +++ b/src/main/java/com/jd/platform/test/seq/SeqWorker1.java @@ -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. diff --git a/src/main/java/com/tianyalei/test/seq/SeqWorker2.java b/src/main/java/com/jd/platform/test/seq/SeqWorker2.java similarity index 83% rename from src/main/java/com/tianyalei/test/seq/SeqWorker2.java rename to src/main/java/com/jd/platform/test/seq/SeqWorker2.java index d6f4a33..463870c 100755 --- a/src/main/java/com/tianyalei/test/seq/SeqWorker2.java +++ b/src/main/java/com/jd/platform/test/seq/SeqWorker2.java @@ -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. diff --git a/src/main/java/com/tianyalei/test/seq/TestSequential.java b/src/main/java/com/jd/platform/test/seq/TestSequential.java similarity index 90% rename from src/main/java/com/tianyalei/test/seq/TestSequential.java rename to src/main/java/com/jd/platform/test/seq/TestSequential.java index 58d6dfa..5e3e148 100755 --- a/src/main/java/com/tianyalei/test/seq/TestSequential.java +++ b/src/main/java/com/jd/platform/test/seq/TestSequential.java @@ -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; diff --git a/src/main/java/com/tianyalei/test/seq/TestSequentialTimeout.java b/src/main/java/com/jd/platform/test/seq/TestSequentialTimeout.java similarity index 93% rename from src/main/java/com/tianyalei/test/seq/TestSequentialTimeout.java rename to src/main/java/com/jd/platform/test/seq/TestSequentialTimeout.java index 3e553a1..b730821 100755 --- a/src/main/java/com/tianyalei/test/seq/TestSequentialTimeout.java +++ b/src/main/java/com/jd/platform/test/seq/TestSequentialTimeout.java @@ -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;