mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-21 11:35:12 +08:00
update 全局map
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user