?????? ?????????????????????????? scanNotActiveBroker ???? unregisterBroker?? registerBroker?????????????????????? scanNotActiveBroker ??10??????????????unregisterBroker ?? registerBroker ???????????????????????????????? ???????????????????????? scanNotActiveBroker ?????????????????????? scanNotActiveBroker ?????????????????????? ??10?????????????????????????????????????????????????????????????????????????????????????? ????????????????
------------------ ???????? ------------------ ??????: "??????"<[email protected]>; ????????: 2018??3??14??(??????) ????3:23 ??????: "users"<[email protected]>; ????: rocketmq???????????? this.brokerLiveTable = new HashMap<String, BrokerLiveInfo>(256); */ public void scanNotActiveBroker() { Iterator<Entry<String, BrokerLiveInfo>> it = this.brokerLiveTable.entrySet().iterator(); while (it.hasNext()) { Entry<String, BrokerLiveInfo> next = it.next(); long last = next.getValue().getLastUpdateTimestamp(); if ((last + BROKER_CHANNEL_EXPIRED_TIME) < System.currentTimeMillis()) { RemotingUtil.closeChannel(next.getValue().getChannel()); it.remove(); log.warn("The broker channel expired, {} {}ms", next.getKey(), BROKER_CHANNEL_EXPIRED_TIME); this.onChannelDestroy(/**brokerAddress*/next.getKey(), /**??????channel*/next.getValue().getChannel()); } } }????????rocketmq??????????broker??????????????????????????????????????????????????????????????????????Iterator????????map??????????broker????????????????java.util.ConcurrentModificationException??
