File was renamed from pipIrr-platform/pipIrr-mw/pipIrr-mw-accept/src/main/java/com/dy/aceMw/server/busi/TcpUpDataCache.java |
| | |
| | | package com.dy.aceMw.server.busi; |
| | | package com.dy.aceMw.server.rtuData; |
| | | |
| | | import com.dy.aceMw.server.ServerProperties; |
| | | import com.dy.common.queue.Node; |
| | | import com.dy.common.queue.Queue; |
| | | |
| | | public class TcpUpDataCache { |
| | | public class RtuDataCache { |
| | | |
| | | //TCP下行命令缓存队列 |
| | | private static Queue cacheQueue = new Queue("tcpUpDataQueue") ; |
| | | |
| | | private static TcpUpDataCache instance = new TcpUpDataCache() ; |
| | | private static RtuDataCache instance = new RtuDataCache() ; |
| | | |
| | | private TcpUpDataCache(){ |
| | | private RtuDataCache(){ |
| | | cacheQueue.setLimit(ServerProperties.cacheUpDownDataWarnCount, ServerProperties.cacheUpDownDataMaxCount); |
| | | } |
| | | |
| | | public static TcpUpDataCache getInstance(){ |
| | | public static RtuDataCache getInstance(){ |
| | | return instance ; |
| | | } |
| | | |
| | |
| | | * @param node node |
| | | * @throws Exception 异常 |
| | | */ |
| | | public static void cacheRtuUpData(boolean reportOrResponse_trueOrFalse, AboutRtuNode node) throws Exception{ |
| | | public static void cacheRtuUpData(boolean reportOrResponse_trueOrFalse, RtuDataNode node) throws Exception{ |
| | | if(node != null && node.obj != null){ |
| | | if(reportOrResponse_trueOrFalse){ |
| | | cacheQueue.pushHead(node); |