From d6670149331bbdeda4b0573927c13d36225a09c1 Mon Sep 17 00:00:00 2001 From: liurunyu <lry9898@163.com> Date: 星期一, 04 十二月 2023 15:52:08 +0800 Subject: [PATCH] Merge branch 'master' of http://8.140.179.55:20000/r/pipIrr-SV --- pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/support/SupportUnit.java | 46 ++++++++++++++++++++-------------------------- 1 files changed, 20 insertions(+), 26 deletions(-) diff --git a/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/support/SupportUnit.java b/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/support/SupportUnit.java index 4bd6941..ea7216e 100644 --- a/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/support/SupportUnit.java +++ b/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/support/SupportUnit.java @@ -39,36 +39,31 @@ public void start(UnitStartedCallbackInterface callback) throws Exception { if(!started){ started = true ; - if(confVo.enableShortThreadPool) { - TreadPoolFactory.initThreadPoolShort("鐭换鍔″伐浣滅嚎绋嬫睜", - this.confVo.short_maxThread, - this.confVo.short_minThread, - this.confVo.short_freeTimeout, + if(confVo.enableThreadPool){ + TreadPoolFactory.initThreadPoolShort("鐭换鍔″伐浣滅嚎绋嬫睜", + this.confVo.short_maxThread, + this.confVo.short_minThread, + this.confVo.short_freeTimeout, this.confVo.short_busyTimeout); - }else{ - System.out.println("鐭嚎绋嬫睜閰嶇疆涓嶅惎鍔�"); - } - if(confVo.enableLongThreadPool) { - TreadPoolFactory.initThreadPoolLong("闀夸换鍔″伐浣滅嚎绋嬫睜", - this.confVo.long_maxThread, - this.confVo.long_minThread, - this.confVo.long_freeTimeout, + TreadPoolFactory.initThreadPoolLong("闀夸换鍔″伐浣滅嚎绋嬫睜", + this.confVo.long_maxThread, + this.confVo.long_minThread, + this.confVo.long_freeTimeout, this.confVo.long_busyTimeout); - }else{ - System.out.println("闀跨嚎绋嬫睜閰嶇疆涓嶅惎鍔�"); + + if(this.confVo.showStartInfo){ + System.out.println("绾跨▼姹犳ā鍧楁垚鍔熷惎鍔�"); + } } - if(this.confVo.showStartInfo){ - System.out.println("绾跨▼姹犳ā鍧楁垚鍔熷惎鍔�"); - } + callback.call(null); } - callback.call(null); } @Override - public void stop(UnitStartedCallbackInterface callback) { + public void stop(UnitStartedCallbackInterface callback) throws Exception { } - /* + public static void main(String[] args) throws Exception{ SupportUnitConfigVo supVo = new SupportUnitConfigVo() ; //鐭伐浣滄椂闀跨嚎绋嬫睜锛岀嚎绋嬭礋璐g敤鏃惰緝鐭殑宸ヤ綔浠诲姟 @@ -87,9 +82,8 @@ supVo.long_busyTimeout = -1 ; } - supVo.enableShortThreadPool = true ; - supVo.enableLongThreadPool = true ; - + supVo.enableThreadPool = true ; + supVo.showStartInfo = true ; SupportUnit supUnit = SupportUnit.getInstance() ; @@ -100,7 +94,6 @@ supUnit.start(obj -> { }); } - private static class AdapterImp_SupportUnit implements SupportUnitAdapter { private SupportUnitConfigVo configVo = null ; @@ -113,6 +106,7 @@ public void setConfig(SupportUnitConfigVo configVo) { this.configVo = configVo; } + + } - */ } -- Gitblit v1.8.0