From e409fb4186e9e0d8a724d95ca49346794fea9819 Mon Sep 17 00:00:00 2001 From: airoger Date: Sat, 3 Sep 2022 11:46:26 +0800 Subject: [PATCH] remove threadPoolNamePrefix and set alarm params --- .../starter/support/DynamicThreadPoolPostProcessor.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hippo4j-spring-boot/hippo4j-spring-boot-starter/src/main/java/cn/hippo4j/springboot/starter/support/DynamicThreadPoolPostProcessor.java b/hippo4j-spring-boot/hippo4j-spring-boot-starter/src/main/java/cn/hippo4j/springboot/starter/support/DynamicThreadPoolPostProcessor.java index aef0fe0c..fe80b71b 100644 --- a/hippo4j-spring-boot/hippo4j-spring-boot-starter/src/main/java/cn/hippo4j/springboot/starter/support/DynamicThreadPoolPostProcessor.java +++ b/hippo4j-spring-boot/hippo4j-spring-boot-starter/src/main/java/cn/hippo4j/springboot/starter/support/DynamicThreadPoolPostProcessor.java @@ -176,7 +176,6 @@ public final class DynamicThreadPoolPostProcessor implements BeanPostProcessor { // DynamicThreadPool configuration undefined in server DynamicThreadPoolRegisterParameter parameterInfo = DynamicThreadPoolRegisterParameter.builder() .threadPoolId(threadPoolId) - .threadNamePrefix(threadPoolId) .corePoolSize(executor.getCorePoolSize()) .maximumPoolSize(executor.getMaximumPoolSize()) .blockingQueueType(BlockingQueueTypeEnum.getBlockingQueueTypeEnumByName(executor.getQueue().getClass().getSimpleName())) @@ -184,6 +183,8 @@ public final class DynamicThreadPoolPostProcessor implements BeanPostProcessor { .allowCoreThreadTimeOut(executor.allowsCoreThreadTimeOut()) .keepAliveTime(executor.getKeepAliveTime(TimeUnit.MILLISECONDS)) .isAlarm(false) + .activeAlarm(80) + .capacityAlarm(80) .rejectedPolicyType(RejectedPolicyTypeEnum.getRejectedPolicyTypeEnumByName(((DynamicThreadPoolExecutor) executor).getRedundancyHandler().getClass().getSimpleName())) .build(); DynamicThreadPoolRegisterWrapper registerWrapper = DynamicThreadPoolRegisterWrapper.builder()