Tomcat thread pool details return reject policy name

pull/359/head
chen.ma 2 years ago
parent 68f79fd018
commit 8de8806f52

@ -152,6 +152,9 @@ public class TomcatWebThreadPoolHandler extends AbstractWebThreadPoolService {
runStateInfo.setCompletedTaskCount(completedTaskCount);
runStateInfo.setClientLastRefreshTime(DateUtil.formatDateTime(new Date()));
runStateInfo.setTimestamp(System.currentTimeMillis());
String rejectedExecutionHandlerName = executor instanceof ThreadPoolExecutor ? ((ThreadPoolExecutor) executor).getRejectedExecutionHandler().getClass().getSimpleName()
: tomcatThreadPoolExecutor.getRejectedExecutionHandler().getClass().getSimpleName();
runStateInfo.setRejectedName(rejectedExecutionHandlerName);
return webThreadPoolRunStateHandler.supplement(runStateInfo);
}

Loading…
Cancel
Save