Pu Zhibing
12 小时以前 185b6c7f14d8324540f39913e2b92146636cc5e0
ruoyi-service/ruoyi-dataInterchange/src/main/java/com/ruoyi/dataInterchange/netty/client/ChannelMap.java
@@ -7,6 +7,7 @@
import io.netty.channel.group.DefaultChannelGroup;
import io.netty.util.concurrent.GlobalEventExecutor;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
@@ -16,17 +17,17 @@
 */
public class ChannelMap {
   //存储主链路通道
   private static final ChannelGroup SERVER_GROUP = new DefaultChannelGroup("Jtt809Server", GlobalEventExecutor.INSTANCE);
   private static ChannelGroup SERVER_GROUP = new DefaultChannelGroup("Jtt809Server", GlobalEventExecutor.INSTANCE);
   //存储主链路ID
   private static final Map<Integer, ChannelId> SERVER_ID_MAP = new ConcurrentHashMap<>();
   private static Map<Integer, ChannelId> SERVER_ID_MAP = new HashMap<>();
   //存储从链路通道
   private static final ChannelGroup CLIENT_GROUP = new DefaultChannelGroup("Jtt809Client", GlobalEventExecutor.INSTANCE);
   private static ChannelGroup CLIENT_GROUP = new DefaultChannelGroup("Jtt809Client", GlobalEventExecutor.INSTANCE);
   //存储从链路ID
   private static final Map<Integer, ChannelId> CLIENT_ID_MAP = new ConcurrentHashMap<>();
   private static Map<Integer, ChannelId> CLIENT_ID_MAP = new HashMap<>();
   //存储从链路连接地址和端口号
   private static final Map<Integer, UPConnect> IP_PORT = new ConcurrentHashMap<>();
   private static Map<Integer, UPConnect> IP_PORT = new HashMap<>();
   //存储从链路连接重试次数
   private static final Map<Integer, Integer> TIMES = new ConcurrentHashMap<>();
   private static Map<Integer, Integer> TIMES = new HashMap<>();
   
   /**
    * 保存通道
@@ -110,7 +111,7 @@
    * @param key
    * @return
    */
   public static int getTimes(int key) {
   public static Integer getTimes(int key) {
      return TIMES.get(key);
   }