日期:2014-05-20 浏览次数:20657 次
private Map<Integer, Map<String, ServerState>> serverStateMap = null; // channelId,ip,ServerState private static ServerStateRepo instance = new ServerStateRepo(); public void updateServerState(int channelId, String ip, ServerState serverState) {//这个方法有效果? synchronized (serverStateMap) { log.info("updateServerState"); Map<String, ServerState> ipServerMap = serverStateMap.get(channelId); //ip,serverState if (null != ipServerMap) { ipServerMap.put(ip, serverState); } } }