From 9eb3d6702c575fa52ba1048ca32cee7ede2da1e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BE=99=E5=8F=B0?= Date: Mon, 2 Aug 2021 20:16:28 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E8=B0=83=E6=95=B4=20SPI=20Package?= =?UTF-8?q?=20=E7=9B=AE=E5=BD=95.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../threadpool/starter/spi/{queue => }/CustomBlockingQueue.java | 2 +- .../spi/{rejected => }/CustomRejectedExecutionHandler.java | 2 +- .../dynamic/threadpool/starter/spi/DynamicTpServiceLoader.java | 2 -- .../{exception => }/ServiceLoaderInstantiationException.java | 2 +- .../threadpool/starter/toolkit/thread/QueueTypeEnum.java | 2 +- .../threadpool/starter/toolkit/thread/RejectedTypeEnum.java | 2 +- 6 files changed, 5 insertions(+), 7 deletions(-) rename dynamic-threadpool-spring-boot-starter/src/main/java/io/dynamic/threadpool/starter/spi/{queue => }/CustomBlockingQueue.java (87%) rename dynamic-threadpool-spring-boot-starter/src/main/java/io/dynamic/threadpool/starter/spi/{rejected => }/CustomRejectedExecutionHandler.java (88%) rename dynamic-threadpool-spring-boot-starter/src/main/java/io/dynamic/threadpool/starter/spi/{exception => }/ServiceLoaderInstantiationException.java (88%) diff --git a/dynamic-threadpool-spring-boot-starter/src/main/java/io/dynamic/threadpool/starter/spi/queue/CustomBlockingQueue.java b/dynamic-threadpool-spring-boot-starter/src/main/java/io/dynamic/threadpool/starter/spi/CustomBlockingQueue.java similarity index 87% rename from dynamic-threadpool-spring-boot-starter/src/main/java/io/dynamic/threadpool/starter/spi/queue/CustomBlockingQueue.java rename to dynamic-threadpool-spring-boot-starter/src/main/java/io/dynamic/threadpool/starter/spi/CustomBlockingQueue.java index 15bd60a8..c06f160c 100644 --- a/dynamic-threadpool-spring-boot-starter/src/main/java/io/dynamic/threadpool/starter/spi/queue/CustomBlockingQueue.java +++ b/dynamic-threadpool-spring-boot-starter/src/main/java/io/dynamic/threadpool/starter/spi/CustomBlockingQueue.java @@ -1,4 +1,4 @@ -package io.dynamic.threadpool.starter.spi.queue; +package io.dynamic.threadpool.starter.spi; import java.util.concurrent.BlockingQueue; diff --git a/dynamic-threadpool-spring-boot-starter/src/main/java/io/dynamic/threadpool/starter/spi/rejected/CustomRejectedExecutionHandler.java b/dynamic-threadpool-spring-boot-starter/src/main/java/io/dynamic/threadpool/starter/spi/CustomRejectedExecutionHandler.java similarity index 88% rename from dynamic-threadpool-spring-boot-starter/src/main/java/io/dynamic/threadpool/starter/spi/rejected/CustomRejectedExecutionHandler.java rename to dynamic-threadpool-spring-boot-starter/src/main/java/io/dynamic/threadpool/starter/spi/CustomRejectedExecutionHandler.java index 7cb297fb..624f5dd2 100644 --- a/dynamic-threadpool-spring-boot-starter/src/main/java/io/dynamic/threadpool/starter/spi/rejected/CustomRejectedExecutionHandler.java +++ b/dynamic-threadpool-spring-boot-starter/src/main/java/io/dynamic/threadpool/starter/spi/CustomRejectedExecutionHandler.java @@ -1,4 +1,4 @@ -package io.dynamic.threadpool.starter.spi.rejected; +package io.dynamic.threadpool.starter.spi; import java.util.concurrent.RejectedExecutionHandler; diff --git a/dynamic-threadpool-spring-boot-starter/src/main/java/io/dynamic/threadpool/starter/spi/DynamicTpServiceLoader.java b/dynamic-threadpool-spring-boot-starter/src/main/java/io/dynamic/threadpool/starter/spi/DynamicTpServiceLoader.java index 9bfbe9f2..1365a1b7 100644 --- a/dynamic-threadpool-spring-boot-starter/src/main/java/io/dynamic/threadpool/starter/spi/DynamicTpServiceLoader.java +++ b/dynamic-threadpool-spring-boot-starter/src/main/java/io/dynamic/threadpool/starter/spi/DynamicTpServiceLoader.java @@ -1,7 +1,5 @@ package io.dynamic.threadpool.starter.spi; -import io.dynamic.threadpool.starter.spi.exception.ServiceLoaderInstantiationException; - import java.util.*; import java.util.concurrent.ConcurrentHashMap; import java.util.stream.Collectors; diff --git a/dynamic-threadpool-spring-boot-starter/src/main/java/io/dynamic/threadpool/starter/spi/exception/ServiceLoaderInstantiationException.java b/dynamic-threadpool-spring-boot-starter/src/main/java/io/dynamic/threadpool/starter/spi/ServiceLoaderInstantiationException.java similarity index 88% rename from dynamic-threadpool-spring-boot-starter/src/main/java/io/dynamic/threadpool/starter/spi/exception/ServiceLoaderInstantiationException.java rename to dynamic-threadpool-spring-boot-starter/src/main/java/io/dynamic/threadpool/starter/spi/ServiceLoaderInstantiationException.java index 718d68bf..9bf53803 100644 --- a/dynamic-threadpool-spring-boot-starter/src/main/java/io/dynamic/threadpool/starter/spi/exception/ServiceLoaderInstantiationException.java +++ b/dynamic-threadpool-spring-boot-starter/src/main/java/io/dynamic/threadpool/starter/spi/ServiceLoaderInstantiationException.java @@ -1,4 +1,4 @@ -package io.dynamic.threadpool.starter.spi.exception; +package io.dynamic.threadpool.starter.spi; /** * Service loader instantiation exception. diff --git a/dynamic-threadpool-spring-boot-starter/src/main/java/io/dynamic/threadpool/starter/toolkit/thread/QueueTypeEnum.java b/dynamic-threadpool-spring-boot-starter/src/main/java/io/dynamic/threadpool/starter/toolkit/thread/QueueTypeEnum.java index 324f4955..52d4440e 100644 --- a/dynamic-threadpool-spring-boot-starter/src/main/java/io/dynamic/threadpool/starter/toolkit/thread/QueueTypeEnum.java +++ b/dynamic-threadpool-spring-boot-starter/src/main/java/io/dynamic/threadpool/starter/toolkit/thread/QueueTypeEnum.java @@ -1,7 +1,7 @@ package io.dynamic.threadpool.starter.toolkit.thread; import io.dynamic.threadpool.starter.spi.DynamicTpServiceLoader; -import io.dynamic.threadpool.starter.spi.queue.CustomBlockingQueue; +import io.dynamic.threadpool.starter.spi.CustomBlockingQueue; import java.util.Collection; import java.util.Objects; diff --git a/dynamic-threadpool-spring-boot-starter/src/main/java/io/dynamic/threadpool/starter/toolkit/thread/RejectedTypeEnum.java b/dynamic-threadpool-spring-boot-starter/src/main/java/io/dynamic/threadpool/starter/toolkit/thread/RejectedTypeEnum.java index ed208402..fd0532c7 100644 --- a/dynamic-threadpool-spring-boot-starter/src/main/java/io/dynamic/threadpool/starter/toolkit/thread/RejectedTypeEnum.java +++ b/dynamic-threadpool-spring-boot-starter/src/main/java/io/dynamic/threadpool/starter/toolkit/thread/RejectedTypeEnum.java @@ -1,7 +1,7 @@ package io.dynamic.threadpool.starter.toolkit.thread; import io.dynamic.threadpool.starter.spi.DynamicTpServiceLoader; -import io.dynamic.threadpool.starter.spi.rejected.CustomRejectedExecutionHandler; +import io.dynamic.threadpool.starter.spi.CustomRejectedExecutionHandler; import java.util.Collection; import java.util.Objects;