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-mw/pipIrr-mw-accept/src/main/java/com/dy/aceMw/server/tasks/ToRtuConstantTask.java | 46 ++++++++++++++-------------------------------- 1 files changed, 14 insertions(+), 32 deletions(-) diff --git a/pipIrr-platform/pipIrr-mw/pipIrr-mw-accept/src/main/java/com/dy/aceMw/server/tasks/ToRtuConstantTask.java b/pipIrr-platform/pipIrr-mw/pipIrr-mw-accept/src/main/java/com/dy/aceMw/server/tasks/ToRtuConstantTask.java index d042ef3..08721c8 100644 --- a/pipIrr-platform/pipIrr-mw/pipIrr-mw-accept/src/main/java/com/dy/aceMw/server/tasks/ToRtuConstantTask.java +++ b/pipIrr-platform/pipIrr-mw/pipIrr-mw-accept/src/main/java/com/dy/aceMw/server/tasks/ToRtuConstantTask.java @@ -5,7 +5,7 @@ import com.dy.common.queue.Node; import com.dy.common.mw.core.CoreTask; -import com.dy.aceMw.server.forTcp.TcpDownCommandCache; +import com.dy.aceMw.server.forTcp.TcpDownCommandCach; import com.dy.aceMw.server.forTcp.TcpDownCommandObj; import com.dy.aceMw.server.forTcp.TcpSessionCach; @@ -40,12 +40,16 @@ * 澶勭悊涓嬭鍛戒护 */ public Integer dealDownCommand(Long now) { - Node first = TcpDownCommandCache.getFirstQueueNode() ; - if(first != null){ - Integer count = TcpDownCommandCache.size() ; - Node last = TcpDownCommandCache.getLastQueueNode() ; - this.doDealDownCommand(now, first, last); - return count ; + try{ + Node first = TcpDownCommandCach.getFirstQueueNode() ; + if(first != null){ + Integer count = TcpDownCommandCach.size() ; + Node last = TcpDownCommandCach.getLastQueueNode() ; + this.doDealDownCommand(now, first, last); + return count ; + } + }catch(Exception e){ + log.error(e); } return null ; } @@ -53,9 +57,9 @@ * 澶勭悊缂撳瓨鐨勪笅琛屽懡浠よ妭鐐� * @param now 褰撳墠鏃跺埢 * @param first 绗竴涓妭鐐� - * @param last 鏈�鍚庝竴涓妭鐐� + * @param last 鏄悗涓�涓妭鐐� */ - private void doDealDownCommand1(Long now, Node first, Node last){ + private void doDealDownCommand(Long now, Node first, Node last){ if(first != null){ //鍦╠ealNode鏂规硶涓紝鍙兘瑕佹妸first浠庨槦鍒椾腑绉婚櫎锛岃繖鏃秄irst.next涓虹┖锛屾墍浠ユ彁鍓嶆妸first.next鍙栧嚭鏉� Node next = first.next ; @@ -70,28 +74,6 @@ } } } - - /** - * 澶勭悊缂撳瓨鐨勪笅琛屽懡浠よ妭鐐� - * @param now 褰撳墠鏃跺埢 - * @param first 绗竴涓妭鐐� - * @param last 鏈�鍚庝竴涓妭鐐� - */ - private void doDealDownCommand(Long now, Node first, Node last){ - if(last != null){ - //鍦╠ealNode鏂规硶涓紝鍙兘瑕佹妸last浠庨槦鍒椾腑绉婚櫎锛岃繖鏃秎ast.pre涓虹┖锛屾墍浠ユ彁鍓嶆妸last.pre鍙栧嚭鏉� - Node pre = last.pre ; - dealNode(now, last) ; - if(first != null && first != last){ - doDealDownCommand(now, first, pre) ; - }else if(first != null && first == last){ - //鍋滄 - }else if(first == null){ - //杩欑鎯呭喌涓嶄細瀛樺湪 - doDealDownCommand(now, null, pre) ; - } - } - } /** * 澶勭悊涓�涓妭鐐� @@ -102,7 +84,7 @@ TcpDownCommandObj obj = (TcpDownCommandObj)node.obj ; boolean removeNode = obj.dealSelf(now) ; if(removeNode){ - TcpDownCommandCache.removeNode(node); + TcpDownCommandCach.removeNode(node); } } -- Gitblit v1.8.0