private String computPullFromWhichFilterServer(final String topic, final String brokerAddr) throws MQClientException { ConcurrentHashMap<String, TopicRouteData> topicRouteTable = this.mQClientFactory.getTopicRouteTable(); if (topicRouteTable != null) { TopicRouteData topicRouteData = topicRouteTable.get(topic); List<String> list = topicRouteData.getFilterServerTable().get(brokerAddr); if (list != null && !list.isEmpty()) { return list.get(randomNum() % list.size()); } } throw new MQClientException("Find Filter Server Failed, Broker Addr: " + brokerAddr + " topic: " + topic, null); }
private String computPullFromWhichFilterServer(final String topic, final String brokerAddr) throws MQClientException { ConcurrentHashMap<String, TopicRouteData> topicRouteTable = this.mQClientFactory.getTopicRouteTable(); if (topicRouteTable != null) { TopicRouteData topicRouteData = topicRouteTable.get(topic); List<String> list = topicRouteData.getFilterServerTable().get(brokerAddr); if (list != null && !list.isEmpty()) { return list.get(randomNum() % list.size()); } } throw new MQClientException("Find Filter Server Failed, Broker Addr: " + brokerAddr + " topic: " + topic, null); }
&& topicRouteData.getFilterServerTable() != null && !topicRouteData.getFilterServerTable().isEmpty()) { Iterator<Entry<String, List<String>>> it = topicRouteData.getFilterServerTable().entrySet().iterator(); while (it.hasNext()) { Entry<String, List<String>> next = it.next();
&& topicRouteData.getFilterServerTable() != null && !topicRouteData.getFilterServerTable().isEmpty()) { Iterator<Entry<String, List<String>>> it = topicRouteData.getFilterServerTable().entrySet().iterator(); while (it.hasNext()) { Entry<String, List<String>> next = it.next();
public TopicRouteData cloneTopicRouteData() { TopicRouteData topicRouteData = new TopicRouteData(); topicRouteData.setQueueDatas(new ArrayList<QueueData>()); topicRouteData.setBrokerDatas(new ArrayList<BrokerData>()); topicRouteData.setFilterServerTable(new HashMap<String, List<String>>()); topicRouteData.setOrderTopicConf(this.orderTopicConf); if (this.queueDatas != null) { topicRouteData.getQueueDatas().addAll(this.queueDatas); } if (this.brokerDatas != null) { topicRouteData.getBrokerDatas().addAll(this.brokerDatas); } if (this.filterServerTable != null) { topicRouteData.getFilterServerTable().putAll(this.filterServerTable); } return topicRouteData; }
public TopicRouteData cloneTopicRouteData() { TopicRouteData topicRouteData = new TopicRouteData(); topicRouteData.setQueueDatas(new ArrayList<QueueData>()); topicRouteData.setBrokerDatas(new ArrayList<BrokerData>()); topicRouteData.setFilterServerTable(new HashMap<String, List<String>>()); topicRouteData.setOrderTopicConf(this.orderTopicConf); if (this.queueDatas != null) { topicRouteData.getQueueDatas().addAll(this.queueDatas); } if (this.brokerDatas != null) { topicRouteData.getBrokerDatas().addAll(this.brokerDatas); } if (this.filterServerTable != null) { topicRouteData.getFilterServerTable().putAll(this.filterServerTable); } return topicRouteData; }
public TopicRouteData cloneTopicRouteData() { TopicRouteData topicRouteData = new TopicRouteData(); topicRouteData.setQueueDatas(new ArrayList<QueueData>()); topicRouteData.setBrokerDatas(new ArrayList<BrokerData>()); topicRouteData.setFilterServerTable(new HashMap<String, List<String>>()); topicRouteData.setOrderTopicConf(this.orderTopicConf); if (this.queueDatas != null) { topicRouteData.getQueueDatas().addAll(this.queueDatas); } if (this.brokerDatas != null) { topicRouteData.getBrokerDatas().addAll(this.brokerDatas); } if (this.filterServerTable != null) { topicRouteData.getFilterServerTable().putAll(this.filterServerTable); } return topicRouteData; }