From ac34819ca4dadb4dfc14215c31f76db6e3defdd1 Mon Sep 17 00:00:00 2001 From: wuzeyu <1223318623@qq.com> Date: 星期一, 27 十一月 2023 09:27:47 +0800 Subject: [PATCH] 提交了才能重新拉 --- pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/support/SupportUnit.java | 48 +++++++++++++++++++++++++++--------------------- 1 files changed, 27 insertions(+), 21 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 ea7216e..4bd6941 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,31 +39,36 @@ public void start(UnitStartedCallbackInterface callback) throws Exception { if(!started){ started = true ; - if(confVo.enableThreadPool){ - TreadPoolFactory.initThreadPoolShort("鐭换鍔″伐浣滅嚎绋嬫睜", - this.confVo.short_maxThread, - this.confVo.short_minThread, - this.confVo.short_freeTimeout, + if(confVo.enableShortThreadPool) { + TreadPoolFactory.initThreadPoolShort("鐭换鍔″伐浣滅嚎绋嬫睜", + this.confVo.short_maxThread, + this.confVo.short_minThread, + this.confVo.short_freeTimeout, this.confVo.short_busyTimeout); - TreadPoolFactory.initThreadPoolLong("闀夸换鍔″伐浣滅嚎绋嬫睜", - this.confVo.long_maxThread, - this.confVo.long_minThread, - this.confVo.long_freeTimeout, - this.confVo.long_busyTimeout); - - if(this.confVo.showStartInfo){ - System.out.println("绾跨▼姹犳ā鍧楁垚鍔熷惎鍔�"); - } + }else{ + System.out.println("鐭嚎绋嬫睜閰嶇疆涓嶅惎鍔�"); } - callback.call(null); + if(confVo.enableLongThreadPool) { + 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("绾跨▼姹犳ā鍧楁垚鍔熷惎鍔�"); + } } + callback.call(null); } @Override - public void stop(UnitStartedCallbackInterface callback) throws Exception { + public void stop(UnitStartedCallbackInterface callback) { } - + /* public static void main(String[] args) throws Exception{ SupportUnitConfigVo supVo = new SupportUnitConfigVo() ; //鐭伐浣滄椂闀跨嚎绋嬫睜锛岀嚎绋嬭礋璐g敤鏃惰緝鐭殑宸ヤ綔浠诲姟 @@ -82,8 +87,9 @@ supVo.long_busyTimeout = -1 ; } - supVo.enableThreadPool = true ; - + supVo.enableShortThreadPool = true ; + supVo.enableLongThreadPool = true ; + supVo.showStartInfo = true ; SupportUnit supUnit = SupportUnit.getInstance() ; @@ -94,6 +100,7 @@ supUnit.start(obj -> { }); } + private static class AdapterImp_SupportUnit implements SupportUnitAdapter { private SupportUnitConfigVo configVo = null ; @@ -106,7 +113,6 @@ public void setConfig(SupportUnitConfigVo configVo) { this.configVo = configVo; } - - } + */ } -- Gitblit v1.8.0