@Test public void testGetAllClusterInfo() { byte[] clusterInfo = routeInfoManager.getGtsManagerInfo(); assertThat(clusterInfo).isNotNull(); }
public byte[] getGtsManagerInfo() { LiveManageInfo liveManageInfo = new LiveManageInfo(); List<GtsManageLiveAddr> brokerLiveAddrs=this.liveTable.values().stream(). filter(item->Objects.nonNull(item)). map(item-> new GtsManageLiveAddr(item.getGtsManageId(), item.getLastUpdateTimestamp(),item.getGtsManageName(), item.getGtsManageAddr())). collect(Collectors.toList()); liveManageInfo.setGtsManageLiveAddrs(brokerLiveAddrs); return liveManageInfo.encode(); }
RouteInfoManager { public byte[] getGtsManagerInfo() { LiveManageInfo liveManageInfo = new LiveManageInfo(); List<GtsManageLiveAddr> brokerLiveAddrs=this.liveTable.values().stream(). filter(item->Objects.nonNull(item)). map(item-> new GtsManageLiveAddr(item.getGtsManageId(), item.getLastUpdateTimestamp(),item.getGtsManageName(), item.getGtsManageAddr())). collect(Collectors.toList()); liveManageInfo.setGtsManageLiveAddrs(brokerLiveAddrs); return liveManageInfo.encode(); } }
RouteInfoManager { public byte[] getGtsManagerInfo() { LiveManageInfo liveManageInfo = new LiveManageInfo(); List<GtsManageLiveAddr> brokerLiveAddrs=this.liveTable.values().stream(). filter(item->Objects.nonNull(item)). map(item-> new GtsManageLiveAddr(item.getGtsManageId(), item.getLastUpdateTimestamp(),item.getGtsManageName(), item.getGtsManageAddr())). collect(Collectors.toList()); liveManageInfo.setGtsManageLiveAddrs(brokerLiveAddrs); return liveManageInfo.encode(); } RouteInfoManager(); }
RouteInfoManager { public byte[] getGtsManagerInfo() { LiveManageInfo liveManageInfo = new LiveManageInfo(); List<GtsManageLiveAddr> brokerLiveAddrs=this.liveTable.values().stream(). filter(item->Objects.nonNull(item)). map(item-> new GtsManageLiveAddr(item.getGtsManageId(), item.getLastUpdateTimestamp(),item.getGtsManageName(), item.getGtsManageAddr())). collect(Collectors.toList()); liveManageInfo.setGtsManageLiveAddrs(brokerLiveAddrs); return liveManageInfo.encode(); } RouteInfoManager(); byte[] getGtsManagerInfo(); RegisterBrokerResult registerBroker( String brokerAddr, String brokerName, long brokerId, TopicConfigSerializeWrapper topicConfigWrapper, Channel channel); void unregisterBroker( String brokerAddr, String brokerName, long brokerId); void scanNotActiveBroker(); void onChannelDestroy(String remoteAddr, Channel channel); }
RouteInfoManager { public byte[] getGtsManagerInfo() { LiveManageInfo liveManageInfo = new LiveManageInfo(); List<GtsManageLiveAddr> brokerLiveAddrs=this.liveTable.values().stream(). filter(item->Objects.nonNull(item)). map(item-> new GtsManageLiveAddr(item.getGtsManageId(), item.getLastUpdateTimestamp(),item.getGtsManageName(), item.getGtsManageAddr())). collect(Collectors.toList()); liveManageInfo.setGtsManageLiveAddrs(brokerLiveAddrs); return liveManageInfo.encode(); } RouteInfoManager(); byte[] getGtsManagerInfo(); RegisterBrokerResult registerBroker( String brokerAddr, String brokerName, long brokerId, TopicConfigSerializeWrapper topicConfigWrapper, Channel channel); void unregisterBroker( String brokerAddr, String brokerName, long brokerId); void scanNotActiveBroker(); void onChannelDestroy(String remoteAddr, Channel channel);  }