update 全局map

This commit is contained in:
2023-09-18 16:16:02 +08:00
parent d0405c1afd
commit 0372b9a6bf

View File

@@ -3,13 +3,17 @@ package com.jsowell.common.enums.ykc;
import io.netty.channel.Channel;
import java.util.HashMap;
import java.util.concurrent.ConcurrentHashMap;
/**
* 桩编号和channel的关联关系处理 entity
*/
public class PileChannelEntity {
private static HashMap<String, Channel> manager = new HashMap<>();
/**
* 管理一个全局map保存连接进服务端的通道数量
*/
private static final ConcurrentHashMap<String, Channel> manager = new ConcurrentHashMap<>();
public static void put(String pileSn, Channel channel) {
manager.put(pileSn, channel);