From c70b92da60c0d00625da5fc2369b475e69e0b88e Mon Sep 17 00:00:00 2001 From: liurunyu <lry9898@163.com> Date: 星期四, 22 八月 2024 11:36:41 +0800 Subject: [PATCH] 1、完善代码和application.yml配置文件,去掉不用的引入文件; 2、init-config.xml配置中增加属性 enable,相应解析类也增加了解析与判断; 3、凡是有Server的应用,加载资源方式改为用springboot的工具类加载; 4、通信协议相关的扫描注解功能实现改为采用reflections-0.10.2,以实现可以在jar包情况下能够扫描类(.class)注解。 --- pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/threadPool/TreadPoolFactory.java | 25 ++++++++++++++++++++++++- 1 files changed, 24 insertions(+), 1 deletions(-) diff --git a/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/threadPool/TreadPoolFactory.java b/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/threadPool/TreadPoolFactory.java index cbdc7ba..b20cbca 100644 --- a/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/threadPool/TreadPoolFactory.java +++ b/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/threadPool/TreadPoolFactory.java @@ -5,7 +5,27 @@ private static ThreadPool.Pool pool_short ;//鐭伐浣滀换鍔$嚎绋嬫睜锛岀嚎绋嬪伐浣滅敤鏃惰緝鐭� private static ThreadPool.Pool pool_long ;//闀垮伐浣滀换鍔$嚎绋嬫睜锛岀嚎绋嬪伐浣滅敤鏃惰緝闀� - + + + public final static Integer[] pool_short_state(){ + Integer shortCurThread = 0 ;//鐭嚎绋嬫睜褰撳墠绾跨▼鏁� + Integer shortMaxThread = 0 ;//鐭嚎绋嬫睜鏈�澶х嚎绋嬫暟 + Integer shortMinThread = 0 ;//鐭嚎绋嬫睜鏈�灏忕嚎绋嬫暟 + shortCurThread = pool_short.size() ; + shortMaxThread = pool_short.maxThread() ; + shortMinThread = pool_short.minThread() ; + return new Integer[]{shortCurThread, shortMaxThread, shortMinThread} ; + } + + public final static Integer[] pool_long_state(){ + Integer longCurThread = 0 ;//鐭嚎绋嬫睜褰撳墠绾跨▼鏁� + Integer longMaxThread = 0 ;//鐭嚎绋嬫睜鏈�澶х嚎绋嬫暟 + Integer longMinThread = 0 ;//鐭嚎绋嬫睜鏈�灏忕嚎绋嬫暟 + longCurThread = pool_long.size() ; + longMaxThread = pool_long.maxThread() ; + longMinThread = pool_long.minThread() ; + return new Integer[]{longCurThread, longMaxThread, longMinThread} ; + } /** * 鍒濆鍖栫嚎绋嬫睜 * @param poolName 绾跨▼姹犲拰绾跨▼鍚嶇О @@ -51,6 +71,7 @@ } /** * 寰楀埌鍞竴绾跨▼姹犲疄渚� + * @return * @throws Exception */ public final static ThreadPool.Pool getThreadPoolShort() @@ -62,6 +83,8 @@ } /** * 寰楀埌鍞竴绾跨▼姹犲疄渚� + * @return + * @throws Exception */ public final static ThreadPool.Pool getThreadPoolLong() throws Exception { -- Gitblit v1.8.0