perf: 优化

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

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

@ -16,7 +16,7 @@ public class GlobalNotifyAlarmManage {
/** /**
* Notify alarm map. * 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. * Get.

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

Loading…
Cancel
Save