WeChat、Ding 线程池变更添加核心线程超时参数.

pull/39/head
chen.ma 3 years ago
parent a047a25466
commit 830de5d9b6

@ -65,6 +65,7 @@ public class DingAlarmConstants {
" --- \n\n " + " --- \n\n " +
"<font color='#708090' size=2>核心线程数:%s</font> \n\n " + "<font color='#708090' size=2>核心线程数:%s</font> \n\n " +
"<font color='#708090' size=2>最大线程数:%s</font> \n\n " + "<font color='#708090' size=2>最大线程数:%s</font> \n\n " +
"<font color='#708090' size=2>核心线程超时:%s</font> \n\n " +
"<font color='#708090' size=2>线程存活时间:%s / SECONDS</font> \n\n" + "<font color='#708090' size=2>线程存活时间:%s / SECONDS</font> \n\n" +
" --- \n\n " + " --- \n\n " +
"<font color='#708090' size=2>队列类型:%s</font> \n\n " + "<font color='#708090' size=2>队列类型:%s</font> \n\n " +

@ -1,5 +1,6 @@
package cn.hippo4j.starter.alarm.ding; package cn.hippo4j.starter.alarm.ding;
import cn.hippo4j.common.enums.EnableEnum;
import cn.hippo4j.common.model.InstanceInfo; import cn.hippo4j.common.model.InstanceInfo;
import cn.hippo4j.common.model.PoolParameterInfo; import cn.hippo4j.common.model.PoolParameterInfo;
import cn.hippo4j.starter.alarm.NotifyDTO; import cn.hippo4j.starter.alarm.NotifyDTO;
@ -138,6 +139,8 @@ public class DingSendMessageHandler implements SendMessageHandler {
customPool.getCorePoolSize() + " ➲ " + parameter.getCoreSize(), customPool.getCorePoolSize() + " ➲ " + parameter.getCoreSize(),
// 最大线程数 // 最大线程数
customPool.getMaximumPoolSize() + " ➲ " + parameter.getMaxSize(), customPool.getMaximumPoolSize() + " ➲ " + parameter.getMaxSize(),
// 核心线程超时
customPool.allowsCoreThreadTimeOut() + " ➲ " + EnableEnum.getBool(parameter.getAllowCoreThreadTimeOut()),
// 线程存活时间 // 线程存活时间
customPool.getKeepAliveTime(TimeUnit.SECONDS) + " ➲ " + parameter.getKeepAliveTime(), customPool.getKeepAliveTime(TimeUnit.SECONDS) + " ➲ " + parameter.getKeepAliveTime(),
// 阻塞队列 // 阻塞队列

@ -48,6 +48,7 @@ public class WeChatAlarmConstants {
"> 应用实例:%s \n" + "> 应用实例:%s \n" +
"> 核心线程数:%s \n" + "> 核心线程数:%s \n" +
"> 最大线程数:%s \n" + "> 最大线程数:%s \n" +
"> 核心线程超时:%s \n" +
"> 线程存活时间:%s / SECONDS \n" + "> 线程存活时间:%s / SECONDS \n" +
"> 队列类型:%s \n" + "> 队列类型:%s \n" +
"> 队列容量:%s \n" + "> 队列容量:%s \n" +

@ -1,5 +1,6 @@
package cn.hippo4j.starter.alarm.wechat; package cn.hippo4j.starter.alarm.wechat;
import cn.hippo4j.common.enums.EnableEnum;
import cn.hippo4j.common.model.InstanceInfo; import cn.hippo4j.common.model.InstanceInfo;
import cn.hippo4j.common.model.PoolParameterInfo; import cn.hippo4j.common.model.PoolParameterInfo;
import cn.hippo4j.common.toolkit.JSONUtil; import cn.hippo4j.common.toolkit.JSONUtil;
@ -126,6 +127,8 @@ public class WeChatSendMessageHandler implements SendMessageHandler {
customPool.getCorePoolSize() + " ➲ " + parameter.getCoreSize(), customPool.getCorePoolSize() + " ➲ " + parameter.getCoreSize(),
// 最大线程数 // 最大线程数
customPool.getMaximumPoolSize() + " ➲ " + parameter.getMaxSize(), customPool.getMaximumPoolSize() + " ➲ " + parameter.getMaxSize(),
// 核心线程超时
customPool.allowsCoreThreadTimeOut() + " ➲ " + EnableEnum.getBool(parameter.getAllowCoreThreadTimeOut()),
// 线程存活时间 // 线程存活时间
customPool.getKeepAliveTime(TimeUnit.SECONDS) + " ➲ " + parameter.getKeepAliveTime(), customPool.getKeepAliveTime(TimeUnit.SECONDS) + " ➲ " + parameter.getKeepAliveTime(),
// 阻塞队列 // 阻塞队列

Loading…
Cancel
Save