diff --git a/dynamic-threadpool-spring-boot-starter/src/main/java/com/github/dynamic/threadpool/starter/alarm/DingSendMessageHandler.java b/dynamic-threadpool-spring-boot-starter/src/main/java/com/github/dynamic/threadpool/starter/alarm/DingSendMessageHandler.java index c7d488bf..65ad4ccc 100644 --- a/dynamic-threadpool-spring-boot-starter/src/main/java/com/github/dynamic/threadpool/starter/alarm/DingSendMessageHandler.java +++ b/dynamic-threadpool-spring-boot-starter/src/main/java/com/github/dynamic/threadpool/starter/alarm/DingSendMessageHandler.java @@ -11,7 +11,7 @@ import com.github.dynamic.threadpool.starter.core.GlobalThreadPoolManage; import com.github.dynamic.threadpool.starter.core.DynamicThreadPoolExecutor; import com.github.dynamic.threadpool.starter.toolkit.thread.QueueTypeEnum; import com.github.dynamic.threadpool.starter.toolkit.thread.RejectedTypeEnum; -import com.github.dynamic.threadpool.starter.wrap.DynamicThreadPoolWrapper; +import com.github.dynamic.threadpool.starter.wrapper.DynamicThreadPoolWrapper; import com.google.common.base.Joiner; import com.taobao.api.ApiException; import lombok.AllArgsConstructor; diff --git a/dynamic-threadpool-spring-boot-starter/src/main/java/com/github/dynamic/threadpool/starter/core/CacheData.java b/dynamic-threadpool-spring-boot-starter/src/main/java/com/github/dynamic/threadpool/starter/core/CacheData.java index 4eb1e6b8..6318c5b1 100644 --- a/dynamic-threadpool-spring-boot-starter/src/main/java/com/github/dynamic/threadpool/starter/core/CacheData.java +++ b/dynamic-threadpool-spring-boot-starter/src/main/java/com/github/dynamic/threadpool/starter/core/CacheData.java @@ -1,6 +1,6 @@ package com.github.dynamic.threadpool.starter.core; -import com.github.dynamic.threadpool.starter.wrap.ManagerListenerWrap; +import com.github.dynamic.threadpool.starter.wrapper.ManagerListenerWrapper; import com.github.dynamic.threadpool.common.toolkit.ContentUtil; import com.github.dynamic.threadpool.common.toolkit.Md5Util; import com.github.dynamic.threadpool.common.constant.Constants; @@ -33,7 +33,7 @@ public class CacheData { private volatile long localConfigLastModified; - private final CopyOnWriteArrayList listeners; + private final CopyOnWriteArrayList listeners; public CacheData(String tenantId, String itemId, String tpId) { this.tenantId = tenantId; @@ -50,7 +50,7 @@ public class CacheData { throw new IllegalArgumentException("listener is null"); } - ManagerListenerWrap managerListenerWrap = new ManagerListenerWrap(md5, listener); + ManagerListenerWrapper managerListenerWrap = new ManagerListenerWrapper(md5, listener); if (listeners.addIfAbsent(managerListenerWrap)) { log.info("Add listener status :: ok, tpId :: {}, cnt :: {}", tpId, listeners.size()); @@ -58,14 +58,14 @@ public class CacheData { } public void checkListenerMd5() { - for (ManagerListenerWrap wrap : listeners) { + for (ManagerListenerWrapper wrap : listeners) { if (!md5.equals(wrap.getLastCallMd5())) { safeNotifyListener(content, md5, wrap); } } } - private void safeNotifyListener(String content, String md5, ManagerListenerWrap wrap) { + private void safeNotifyListener(String content, String md5, ManagerListenerWrapper wrap) { Listener listener = wrap.getListener(); Runnable runnable = () -> { diff --git a/dynamic-threadpool-spring-boot-starter/src/main/java/com/github/dynamic/threadpool/starter/core/DynamicThreadPoolPostProcessor.java b/dynamic-threadpool-spring-boot-starter/src/main/java/com/github/dynamic/threadpool/starter/core/DynamicThreadPoolPostProcessor.java index 26626f4e..ba35bf15 100644 --- a/dynamic-threadpool-spring-boot-starter/src/main/java/com/github/dynamic/threadpool/starter/core/DynamicThreadPoolPostProcessor.java +++ b/dynamic-threadpool-spring-boot-starter/src/main/java/com/github/dynamic/threadpool/starter/core/DynamicThreadPoolPostProcessor.java @@ -11,7 +11,7 @@ import com.github.dynamic.threadpool.starter.remote.HttpAgent; import com.github.dynamic.threadpool.starter.toolkit.thread.QueueTypeEnum; import com.github.dynamic.threadpool.starter.toolkit.thread.RejectedTypeEnum; import com.github.dynamic.threadpool.starter.toolkit.thread.ThreadPoolBuilder; -import com.github.dynamic.threadpool.starter.wrap.DynamicThreadPoolWrapper; +import com.github.dynamic.threadpool.starter.wrapper.DynamicThreadPoolWrapper; import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; import lombok.var; diff --git a/dynamic-threadpool-spring-boot-starter/src/main/java/com/github/dynamic/threadpool/starter/core/GlobalThreadPoolManage.java b/dynamic-threadpool-spring-boot-starter/src/main/java/com/github/dynamic/threadpool/starter/core/GlobalThreadPoolManage.java index a51ae9d8..785bfab1 100644 --- a/dynamic-threadpool-spring-boot-starter/src/main/java/com/github/dynamic/threadpool/starter/core/GlobalThreadPoolManage.java +++ b/dynamic-threadpool-spring-boot-starter/src/main/java/com/github/dynamic/threadpool/starter/core/GlobalThreadPoolManage.java @@ -1,6 +1,6 @@ package com.github.dynamic.threadpool.starter.core; -import com.github.dynamic.threadpool.starter.wrap.DynamicThreadPoolWrapper; +import com.github.dynamic.threadpool.starter.wrapper.DynamicThreadPoolWrapper; import com.github.dynamic.threadpool.common.model.PoolParameter; import java.util.Map; diff --git a/dynamic-threadpool-spring-boot-starter/src/main/java/com/github/dynamic/threadpool/starter/handler/ThreadPoolRunStateHandler.java b/dynamic-threadpool-spring-boot-starter/src/main/java/com/github/dynamic/threadpool/starter/handler/ThreadPoolRunStateHandler.java index 128073eb..3ad75574 100644 --- a/dynamic-threadpool-spring-boot-starter/src/main/java/com/github/dynamic/threadpool/starter/handler/ThreadPoolRunStateHandler.java +++ b/dynamic-threadpool-spring-boot-starter/src/main/java/com/github/dynamic/threadpool/starter/handler/ThreadPoolRunStateHandler.java @@ -4,7 +4,7 @@ import com.github.dynamic.threadpool.common.model.PoolRunStateInfo; import com.github.dynamic.threadpool.starter.core.GlobalThreadPoolManage; import com.github.dynamic.threadpool.starter.toolkit.CalculateUtil; import com.github.dynamic.threadpool.starter.core.DynamicThreadPoolExecutor; -import com.github.dynamic.threadpool.starter.wrap.DynamicThreadPoolWrapper; +import com.github.dynamic.threadpool.starter.wrapper.DynamicThreadPoolWrapper; import lombok.extern.slf4j.Slf4j; import java.net.InetAddress; diff --git a/dynamic-threadpool-spring-boot-starter/src/main/java/com/github/dynamic/threadpool/starter/wrap/DynamicThreadPoolWrapper.java b/dynamic-threadpool-spring-boot-starter/src/main/java/com/github/dynamic/threadpool/starter/wrapper/DynamicThreadPoolWrapper.java similarity index 95% rename from dynamic-threadpool-spring-boot-starter/src/main/java/com/github/dynamic/threadpool/starter/wrap/DynamicThreadPoolWrapper.java rename to dynamic-threadpool-spring-boot-starter/src/main/java/com/github/dynamic/threadpool/starter/wrapper/DynamicThreadPoolWrapper.java index 152706c0..22228c9c 100644 --- a/dynamic-threadpool-spring-boot-starter/src/main/java/com/github/dynamic/threadpool/starter/wrap/DynamicThreadPoolWrapper.java +++ b/dynamic-threadpool-spring-boot-starter/src/main/java/com/github/dynamic/threadpool/starter/wrapper/DynamicThreadPoolWrapper.java @@ -1,4 +1,4 @@ -package com.github.dynamic.threadpool.starter.wrap; +package com.github.dynamic.threadpool.starter.wrapper; import com.github.dynamic.threadpool.starter.common.CommonDynamicThreadPool; import com.github.dynamic.threadpool.starter.core.DynamicThreadPoolExecutor; @@ -8,7 +8,7 @@ import java.util.concurrent.Callable; import java.util.concurrent.Future; /** - * Dynamic threadPool wrap. + * Dynamic threadPool wrapper. * * @author chen.ma * @date 2021/6/20 16:55 diff --git a/dynamic-threadpool-spring-boot-starter/src/main/java/com/github/dynamic/threadpool/starter/wrap/ManagerListenerWrap.java b/dynamic-threadpool-spring-boot-starter/src/main/java/com/github/dynamic/threadpool/starter/wrapper/ManagerListenerWrapper.java similarity index 62% rename from dynamic-threadpool-spring-boot-starter/src/main/java/com/github/dynamic/threadpool/starter/wrap/ManagerListenerWrap.java rename to dynamic-threadpool-spring-boot-starter/src/main/java/com/github/dynamic/threadpool/starter/wrapper/ManagerListenerWrapper.java index 2b35b07d..fb334417 100644 --- a/dynamic-threadpool-spring-boot-starter/src/main/java/com/github/dynamic/threadpool/starter/wrap/ManagerListenerWrap.java +++ b/dynamic-threadpool-spring-boot-starter/src/main/java/com/github/dynamic/threadpool/starter/wrapper/ManagerListenerWrapper.java @@ -1,24 +1,24 @@ -package com.github.dynamic.threadpool.starter.wrap; +package com.github.dynamic.threadpool.starter.wrapper; import com.github.dynamic.threadpool.starter.core.Listener; import lombok.Getter; import lombok.Setter; /** - * Manager listener wrap. + * Manager listener wrapper. * * @author chen.ma * @date 2021/6/22 17:47 */ @Getter @Setter -public class ManagerListenerWrap { +public class ManagerListenerWrapper { private String lastCallMd5; final Listener listener; - public ManagerListenerWrap(String md5, Listener listener) { + public ManagerListenerWrapper(String md5, Listener listener) { this.lastCallMd5 = md5; this.listener = listener; } diff --git a/example/src/main/java/com/github/dynamic/threadpool/example/config/ThreadPoolConfig.java b/example/src/main/java/com/github/dynamic/threadpool/example/config/ThreadPoolConfig.java index a21dd8bd..bc20c7ca 100644 --- a/example/src/main/java/com/github/dynamic/threadpool/example/config/ThreadPoolConfig.java +++ b/example/src/main/java/com/github/dynamic/threadpool/example/config/ThreadPoolConfig.java @@ -3,7 +3,7 @@ package com.github.dynamic.threadpool.example.config; import com.github.dynamic.threadpool.starter.core.DynamicThreadPool; import com.github.dynamic.threadpool.starter.core.DynamicThreadPoolExecutor; import com.github.dynamic.threadpool.starter.toolkit.thread.ThreadPoolBuilder; -import com.github.dynamic.threadpool.starter.wrap.DynamicThreadPoolWrapper; +import com.github.dynamic.threadpool.starter.wrapper.DynamicThreadPoolWrapper; import lombok.extern.slf4j.Slf4j; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; diff --git a/example/src/main/java/com/github/dynamic/threadpool/example/inittest/AlarmSendMessageTest.java b/example/src/main/java/com/github/dynamic/threadpool/example/inittest/AlarmSendMessageTest.java index eb4918fb..5dd19b1a 100644 --- a/example/src/main/java/com/github/dynamic/threadpool/example/inittest/AlarmSendMessageTest.java +++ b/example/src/main/java/com/github/dynamic/threadpool/example/inittest/AlarmSendMessageTest.java @@ -2,7 +2,7 @@ package com.github.dynamic.threadpool.example.inittest; import cn.hutool.core.thread.ThreadUtil; import com.github.dynamic.threadpool.starter.core.GlobalThreadPoolManage; -import com.github.dynamic.threadpool.starter.wrap.DynamicThreadPoolWrapper; +import com.github.dynamic.threadpool.starter.wrapper.DynamicThreadPoolWrapper; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Component; diff --git a/example/src/main/java/com/github/dynamic/threadpool/example/inittest/RunStateHandlerTest.java b/example/src/main/java/com/github/dynamic/threadpool/example/inittest/RunStateHandlerTest.java index 31867c5d..a9296c60 100644 --- a/example/src/main/java/com/github/dynamic/threadpool/example/inittest/RunStateHandlerTest.java +++ b/example/src/main/java/com/github/dynamic/threadpool/example/inittest/RunStateHandlerTest.java @@ -1,7 +1,7 @@ package com.github.dynamic.threadpool.example.inittest; import com.github.dynamic.threadpool.starter.core.GlobalThreadPoolManage; -import com.github.dynamic.threadpool.starter.wrap.DynamicThreadPoolWrapper; +import com.github.dynamic.threadpool.starter.wrapper.DynamicThreadPoolWrapper; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Component;