修改包名,设置版本号

This commit is contained in:
wuweifeng10 2020-02-19 10:33:03 +08:00
parent 7d5cdfaef9
commit 5b1c05032e
33 changed files with 116 additions and 119 deletions

View File

@ -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>

View File

@ -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;
/**
* 默认回调类如果不设置的话会默认给这个回调

View File

@ -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;

View File

@ -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>

View File

@ -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;

View File

@ -1,4 +1,4 @@
package com.tianyalei.async.callback;
package com.jd.platform.async.callback;
/**
* @author wuweifeng wrote on 2019-12-20

View File

@ -1,4 +1,4 @@
package com.tianyalei.async.callback;
package com.jd.platform.async.callback;
/**
* 每个最小执行单元需要实现该接口

View File

@ -1,4 +1,4 @@
package com.tianyalei.async.exception;
package com.jd.platform.async.exception;
/**
* 如果任务在执行之前自己后面的任务已经执行完或正在被执行则抛该exception

View File

@ -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;

View File

@ -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;

View File

@ -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的封装

View File

@ -1,4 +1,4 @@
package com.tianyalei.async.worker;
package com.jd.platform.async.worker;
/**
* 结果状态

View File

@ -1,4 +1,4 @@
package com.tianyalei.async.worker;
package com.jd.platform.async.worker;
/**
* 执行结果

View File

@ -1,4 +1,4 @@
package com.tianyalei.async.wrapper;
package com.jd.platform.async.wrapper;
import java.util.ArrayList;

View File

@ -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;

View File

@ -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.

View File

@ -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.

View File

@ -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.

View File

@ -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;

View File

@ -1,4 +1,4 @@
package com.tianyalei.test.depend;
package com.jd.platform.test.depend;
/**
* 一个包装类

View File

@ -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.

View File

@ -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.

View File

@ -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.

View File

@ -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.

View File

@ -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.

View File

@ -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.

View File

@ -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();
}

View File

@ -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.

View File

@ -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.

View File

@ -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.

View File

@ -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.

View File

@ -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;

View File

@ -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;