perf: 优化

pull/140/head
yangs 2 years ago
parent 2210410c62
commit de94993cfe

@ -135,7 +135,7 @@ public class ThreadPoolNotifyAlarmHandler implements Runnable, CommandLineRunner
*/
public void checkPoolRejectedAlarm(String threadPoolId) {
ThreadPoolNotifyAlarm threadPoolNotifyAlarm = GlobalNotifyAlarmManage.get(threadPoolId);
if (Objects.isNull(threadPoolNotifyAlarm)||!threadPoolNotifyAlarm.getIsAlarm()) {
if (Objects.isNull(threadPoolNotifyAlarm) || !threadPoolNotifyAlarm.getIsAlarm()) {
return;
}

@ -16,7 +16,7 @@ public class GlobalNotifyAlarmManage {
/**
* Notify alarm map.
*/
private static final Map<String, ThreadPoolNotifyAlarm> NOTIFY_ALARM_MAP = new ConcurrentHashMap<>();
private static final Map<String, ThreadPoolNotifyAlarm> NOTIFY_ALARM_MAP = new ConcurrentHashMap();
/**
* Get.

@ -30,7 +30,11 @@ public class RejectedProxyInvocationHandler implements InvocationHandler {
if (ApplicationContextHolder.getInstance() != null) {
ThreadPoolNotifyAlarmHandler alarmHandler = ApplicationContextHolder.getBean(ThreadPoolNotifyAlarmHandler.class);
alarmHandler.checkPoolRejectedAlarm(threadPoolId);
try {
alarmHandler.checkPoolRejectedAlarm(threadPoolId);
} catch (Exception ignored) {
//ignored
}
}
try {

Loading…
Cancel
Save