From 9ad6b0179be4d351105f1507779d4f41a3a41953 Mon Sep 17 00:00:00 2001
From: liurunyu <lry9898@163.com>
Date: 星期六, 07 九月 2024 16:57:40 +0800
Subject: [PATCH] 1、完善代码; 2、江海协议时标(tp)实现中的bug修改。

---
 pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/support/SupportUnit.java |   46 +++++++++++++++++++++++++---------------------
 1 files changed, 25 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..38cc9dd 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
@@ -4,7 +4,7 @@
 import com.dy.common.threadPool.TreadPoolFactory;
 import com.dy.common.mw.UnitAdapterInterface;
 import com.dy.common.mw.UnitInterface;
-import com.dy.common.mw.UnitStartedCallbackInterface;
+import com.dy.common.mw.UnitCallbackInterface;
 
 public class SupportUnit implements UnitInterface {
 	
@@ -36,34 +36,39 @@
 	}
 
 	@Override
-	public void start(UnitStartedCallbackInterface callback) throws Exception {
+	public void start(UnitCallbackInterface 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(UnitCallbackInterface callback) {
 	}
 	
-	
+	/*
 	public static void main(String[] args) throws Exception{
 		SupportUnitConfigVo supVo = new SupportUnitConfigVo() ;
 		//鐭伐浣滄椂闀跨嚎绋嬫睜锛岀嚎绋嬭礋璐g敤鏃惰緝鐭殑宸ヤ綔浠诲姟
@@ -106,7 +111,6 @@
 		public void setConfig(SupportUnitConfigVo configVo) {
 			this.configVo = configVo;
 		}
-
-
 	}
+	*/
 }

--
Gitblit v1.8.0