@Test public void testGetSystemTopicList() { byte[] topicList = routeInfoManager.getSystemTopicList(); assertThat(topicList).isNotNull(); }
public byte[] getSystemTopicList() { TopicList topicList = new TopicList(); try { try { this.lock.readLock().lockInterruptibly(); for (Map.Entry<String, Set<String>> entry : clusterAddrTable.entrySet()) { topicList.getTopicList().add(entry.getKey()); topicList.getTopicList().addAll(entry.getValue()); } if (brokerAddrTable != null && !brokerAddrTable.isEmpty()) { Iterator<String> it = brokerAddrTable.keySet().iterator(); while (it.hasNext()) { BrokerData bd = brokerAddrTable.get(it.next()); HashMap<Long, String> brokerAddrs = bd.getBrokerAddrs(); if (brokerAddrs != null && !brokerAddrs.isEmpty()) { Iterator<Long> it2 = brokerAddrs.keySet().iterator(); topicList.setBrokerAddr(brokerAddrs.get(it2.next())); break; } } } } finally { this.lock.readLock().unlock(); } } catch (Exception e) { log.error("getAllTopicList Exception", e); } return topicList.encode(); }
RouteInfoManager { public byte[] getSystemTopicList() { TopicList topicList = new TopicList(); try { try { this.lock.readLock().lockInterruptibly(); for (Map.Entry<String, Set<String>> entry : clusterAddrTable.entrySet()) { topicList.getTopicList().add(entry.getKey()); topicList.getTopicList().addAll(entry.getValue()); } if (brokerAddrTable != null && !brokerAddrTable.isEmpty()) { Iterator<String> it = brokerAddrTable.keySet().iterator(); while (it.hasNext()) { BrokerData bd = brokerAddrTable.get(it.next()); HashMap<Long, String> brokerAddrs = bd.getBrokerAddrs(); if (brokerAddrs != null && !brokerAddrs.isEmpty()) { Iterator<Long> it2 = brokerAddrs.keySet().iterator(); topicList.setBrokerAddr(brokerAddrs.get(it2.next())); break; } } } } finally { this.lock.readLock().unlock(); } } catch (Exception e) { log.error("getAllTopicList Exception", e); } return topicList.encode(); } }
RouteInfoManager { public byte[] getSystemTopicList() { TopicList topicList = new TopicList(); try { try { this.lock.readLock().lockInterruptibly(); for (Map.Entry<String, Set<String>> entry : clusterAddrTable.entrySet()) { topicList.getTopicList().add(entry.getKey()); topicList.getTopicList().addAll(entry.getValue()); } if (brokerAddrTable != null && !brokerAddrTable.isEmpty()) { Iterator<String> it = brokerAddrTable.keySet().iterator(); while (it.hasNext()) { BrokerData bd = brokerAddrTable.get(it.next()); HashMap<Long, String> brokerAddrs = bd.getBrokerAddrs(); if (brokerAddrs != null && !brokerAddrs.isEmpty()) { Iterator<Long> it2 = brokerAddrs.keySet().iterator(); topicList.setBrokerAddr(brokerAddrs.get(it2.next())); break; } } } } finally { this.lock.readLock().unlock(); } } catch (Exception e) { log.error("getAllTopicList Exception", e); } return topicList.encode(); } RouteInfoManager(); }
RouteInfoManager { public byte[] getSystemTopicList() { TopicList topicList = new TopicList(); try { try { this.lock.readLock().lockInterruptibly(); for (Map.Entry<String, Set<String>> entry : clusterAddrTable.entrySet()) { topicList.getTopicList().add(entry.getKey()); topicList.getTopicList().addAll(entry.getValue()); } if (brokerAddrTable != null && !brokerAddrTable.isEmpty()) { Iterator<String> it = brokerAddrTable.keySet().iterator(); while (it.hasNext()) { BrokerData bd = brokerAddrTable.get(it.next()); HashMap<Long, String> brokerAddrs = bd.getBrokerAddrs(); if (brokerAddrs != null && !brokerAddrs.isEmpty()) { Iterator<Long> it2 = brokerAddrs.keySet().iterator(); topicList.setBrokerAddr(brokerAddrs.get(it2.next())); break; } } } } finally { this.lock.readLock().unlock(); } } catch (Exception e) { log.error("getAllTopicList Exception", e); } return topicList.encode(); } RouteInfoManager(); byte[] getAllClusterInfo(); void deleteTopic(final String topic); byte[] getAllTopicList(); RegisterBrokerResult registerBroker(
        final String clusterName,
        final String brokerAddr,
        final String brokerName,
        final long brokerId,
        final String haServerAddr,
        final TopicConfigSerializeWrapper topicConfigWrapper,
        final List<String> filterServerList,
        final Channel channel); boolean isBrokerTopicConfigChanged(final String brokerAddr, final DataVersion dataVersion); DataVersion queryBrokerTopicConfig(final String brokerAddr); void updateBrokerInfoUpdateTimestamp(final String brokerAddr); int wipeWritePermOfBrokerByLock(final String brokerName); void unregisterBroker(
        final String clusterName,
        final String brokerAddr,
        final String brokerName,
        final long brokerId); TopicRouteData pickupTopicRouteData(final String topic); void scanNotActiveBroker(); void onChannelDestroy(String remoteAddr, Channel channel); void printAllPeriodically(); byte[] getSystemTopicList(); byte[] getTopicsByCluster(String cluster); byte[] getUnitTopics(); byte[] getHasUnitSubTopicList(); byte[] getHasUnitSubUnUnitTopicList(); }
RouteInfoManager { public byte[] getSystemTopicList() { TopicList topicList = new TopicList(); try { try { this.lock.readLock().lockInterruptibly(); for (Map.Entry<String, Set<String>> entry : clusterAddrTable.entrySet()) { topicList.getTopicList().add(entry.getKey()); topicList.getTopicList().addAll(entry.getValue()); } if (brokerAddrTable != null && !brokerAddrTable.isEmpty()) { Iterator<String> it = brokerAddrTable.keySet().iterator(); while (it.hasNext()) { BrokerData bd = brokerAddrTable.get(it.next()); HashMap<Long, String> brokerAddrs = bd.getBrokerAddrs(); if (brokerAddrs != null && !brokerAddrs.isEmpty()) { Iterator<Long> it2 = brokerAddrs.keySet().iterator(); topicList.setBrokerAddr(brokerAddrs.get(it2.next())); break; } } } } finally { this.lock.readLock().unlock(); } } catch (Exception e) { log.error("getAllTopicList Exception", e); } return topicList.encode(); } RouteInfoManager(); byte[] getAllClusterInfo(); void deleteTopic(final String topic); byte[] getAllTopicList(); RegisterBrokerResult registerBroker(
        final String clusterName,
        final String brokerAddr,
        final String brokerName,
        final long brokerId,
        final String haServerAddr,
        final TopicConfigSerializeWrapper topicConfigWrapper,
        final List<String> filterServerList,
        final Channel channel); boolean isBrokerTopicConfigChanged(final String brokerAddr, final DataVersion dataVersion); DataVersion queryBrokerTopicConfig(final String brokerAddr); void updateBrokerInfoUpdateTimestamp(final String brokerAddr); int wipeWritePermOfBrokerByLock(final String brokerName); void unregisterBroker(
        final String clusterName,
        final String brokerAddr,
        final String brokerName,
        final long brokerId); TopicRouteData pickupTopicRouteData(final String topic); void scanNotActiveBroker(); void onChannelDestroy(String remoteAddr, Channel channel); void printAllPeriodically(); byte[] getSystemTopicList(); byte[] getTopicsByCluster(String cluster); byte[] getUnitTopics(); byte[] getHasUnitSubTopicList(); byte[] getHasUnitSubUnUnitTopicList();  }