From 1f20678cb038bb50f0249c9044d93ac5d581d251 Mon Sep 17 00:00:00 2001 From: SquirrelChen <13654811+GM-Studio@users.noreply.github.com> Date: Wed, 15 Mar 2023 11:29:07 +0800 Subject: [PATCH 1/2] feat(ThreadPoolMonitor) (#1108) 1. the ThreadPoolMonitor use the new api instead of the deprecated api --- .../springboot/starter/monitor/ThreadPoolMonitorExecutor.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hippo4j-spring-boot/hippo4j-config-spring-boot-starter/src/main/java/cn/hippo4j/config/springboot/starter/monitor/ThreadPoolMonitorExecutor.java b/hippo4j-spring-boot/hippo4j-config-spring-boot-starter/src/main/java/cn/hippo4j/config/springboot/starter/monitor/ThreadPoolMonitorExecutor.java index 04f2d938..7818fe42 100644 --- a/hippo4j-spring-boot/hippo4j-config-spring-boot-starter/src/main/java/cn/hippo4j/config/springboot/starter/monitor/ThreadPoolMonitorExecutor.java +++ b/hippo4j-spring-boot/hippo4j-config-spring-boot-starter/src/main/java/cn/hippo4j/config/springboot/starter/monitor/ThreadPoolMonitorExecutor.java @@ -79,8 +79,8 @@ public class ThreadPoolMonitorExecutor implements ApplicationRunner, DisposableB // Execute dynamic thread pool monitoring component. collectScheduledExecutor.scheduleWithFixedDelay( this::scheduleRunnable, - properties.getInitialDelay(), - properties.getCollectInterval(), + monitor.getInitialDelay(), + monitor.getCollectInterval(), TimeUnit.MILLISECONDS); if (GlobalThreadPoolManage.getThreadPoolNum() > 0) { log.info("Dynamic thread pool: [{}]. The dynamic thread pool starts data collection and reporting.", getThreadPoolNum()); From f65dbb552101528ee5df3ae88fb14cfef824a67a Mon Sep 17 00:00:00 2001 From: zongyuanGitHub <187233878@qq.com> Date: Wed, 15 Mar 2023 11:29:15 +0800 Subject: [PATCH 2/2] delete obsolete field (#1107) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: 启元 --- .../config/BootstrapConfigProperties.java | 24 ------------------- 1 file changed, 24 deletions(-) diff --git a/hippo4j-spring-boot/hippo4j-config-spring-boot-starter/src/main/java/cn/hippo4j/config/springboot/starter/config/BootstrapConfigProperties.java b/hippo4j-spring-boot/hippo4j-config-spring-boot-starter/src/main/java/cn/hippo4j/config/springboot/starter/config/BootstrapConfigProperties.java index 57654b06..a5a435d2 100644 --- a/hippo4j-spring-boot/hippo4j-config-spring-boot-starter/src/main/java/cn/hippo4j/config/springboot/starter/config/BootstrapConfigProperties.java +++ b/hippo4j-spring-boot/hippo4j-config-spring-boot-starter/src/main/java/cn/hippo4j/config/springboot/starter/config/BootstrapConfigProperties.java @@ -51,30 +51,6 @@ public class BootstrapConfigProperties implements BootstrapPropertiesInterface { */ private MonitorProperties monitor = new MonitorProperties(); - /*** - * Latest use {@link MonitorProperties#getEnable()} - */ - @Deprecated - private Boolean collect = Boolean.TRUE; - - /** - * Latest use {@link MonitorProperties#getCollectTypes()} - */ - @Deprecated - private String collectType; - - /** - * Latest use {@link MonitorProperties#getInitialDelay()} - */ - @Deprecated - private Long initialDelay = 10000L; - - /** - * Latest use {@link MonitorProperties#getCollectInterval()} - */ - @Deprecated - private Long collectInterval = 5000L; - /** * Config file type. */