From 4f24205755cbde2de5ebd081e2aae3f36ac95244 Mon Sep 17 00:00:00 2001 From: "chen.ma" Date: Fri, 26 Aug 2022 23:51:04 +0800 Subject: [PATCH] Change class annotation --- .../core/executor/ThreadPoolNotifyAlarmHandler.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/hippo4j-core/src/main/java/cn/hippo4j/core/executor/ThreadPoolNotifyAlarmHandler.java b/hippo4j-core/src/main/java/cn/hippo4j/core/executor/ThreadPoolNotifyAlarmHandler.java index b59a4663..2b5fc3b4 100644 --- a/hippo4j-core/src/main/java/cn/hippo4j/core/executor/ThreadPoolNotifyAlarmHandler.java +++ b/hippo4j-core/src/main/java/cn/hippo4j/core/executor/ThreadPoolNotifyAlarmHandler.java @@ -41,7 +41,7 @@ import java.util.Objects; import java.util.concurrent.*; /** - * Thread-pool alarm notify. + * Thread-pool notify alarm handler. */ @Slf4j @RequiredArgsConstructor @@ -109,8 +109,7 @@ public class ThreadPoolNotifyAlarmHandler implements Runnable, CommandLineRunner int queueSize = blockingQueue.size(); int capacity = queueSize + blockingQueue.remainingCapacity(); int divide = CalculateUtil.divide(queueSize, capacity); - boolean isSend = threadPoolNotifyAlarm.getAlarm() - && divide > threadPoolNotifyAlarm.getCapacityAlarm(); + boolean isSend = threadPoolNotifyAlarm.getAlarm() && divide > threadPoolNotifyAlarm.getCapacityAlarm(); if (isSend) { AlarmNotifyRequest alarmNotifyRequest = buildAlarmNotifyReq(threadPoolExecutor); alarmNotifyRequest.setThreadPoolId(threadPoolId); @@ -129,8 +128,7 @@ public class ThreadPoolNotifyAlarmHandler implements Runnable, CommandLineRunner int maximumPoolSize = threadPoolExecutor.getMaximumPoolSize(); int divide = CalculateUtil.divide(activeCount, maximumPoolSize); ThreadPoolNotifyAlarm threadPoolNotifyAlarm = GlobalNotifyAlarmManage.get(threadPoolId); - boolean isSend = threadPoolNotifyAlarm.getAlarm() - && divide > threadPoolNotifyAlarm.getActiveAlarm(); + boolean isSend = threadPoolNotifyAlarm.getAlarm() && divide > threadPoolNotifyAlarm.getActiveAlarm(); if (isSend) { AlarmNotifyRequest alarmNotifyRequest = buildAlarmNotifyReq(threadPoolExecutor); alarmNotifyRequest.setThreadPoolId(threadPoolId);