Java Code Examples for com.alibaba.rocketmq.common.sysflag.TopicSysFlag#hasUnitSubFlag()
The following examples show how to use
com.alibaba.rocketmq.common.sysflag.TopicSysFlag#hasUnitSubFlag() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: RouteInfoManager.java From rocketmq with Apache License 2.0 | 6 votes |
public byte[] getHasUnitSubTopicList() { TopicList topicList = new TopicList(); try { try { this.lock.readLock().lockInterruptibly(); Iterator<Entry<String, List<QueueData>>> topicTableIt = this.topicQueueTable.entrySet().iterator(); while (topicTableIt.hasNext()) { Entry<String, List<QueueData>> topicEntry = topicTableIt.next(); String topic = topicEntry.getKey(); List<QueueData> queueDatas = topicEntry.getValue(); if (queueDatas != null && queueDatas.size() > 0 && TopicSysFlag.hasUnitSubFlag(queueDatas.get(0).getTopicSynFlag())) { topicList.getTopicList().add(topic); } } } finally { this.lock.readLock().unlock(); } } catch (Exception e) { log.error("getAllTopicList Exception", e); } return topicList.encode(); }
Example 2
Source File: RouteInfoManager.java From rocketmq with Apache License 2.0 | 6 votes |
public byte[] getHasUnitSubUnUnitTopicList() { TopicList topicList = new TopicList(); try { try { this.lock.readLock().lockInterruptibly(); Iterator<Entry<String, List<QueueData>>> topicTableIt = this.topicQueueTable.entrySet().iterator(); while (topicTableIt.hasNext()) { Entry<String, List<QueueData>> topicEntry = topicTableIt.next(); String topic = topicEntry.getKey(); List<QueueData> queueDatas = topicEntry.getValue(); if (queueDatas != null && queueDatas.size() > 0 && !TopicSysFlag.hasUnitFlag(queueDatas.get(0).getTopicSynFlag()) && TopicSysFlag.hasUnitSubFlag(queueDatas.get(0).getTopicSynFlag())) { topicList.getTopicList().add(topic); } } } finally { this.lock.readLock().unlock(); } } catch (Exception e) { log.error("getAllTopicList Exception", e); } return topicList.encode(); }
Example 3
Source File: RouteInfoManager.java From reading-and-annotate-rocketmq-3.4.6 with GNU General Public License v3.0 | 5 votes |
public byte[] getHasUnitSubTopicList() { TopicList topicList = new TopicList(); try { try { this.lock.readLock().lockInterruptibly(); Iterator<Entry<String, List<QueueData>>> topicTableIt = this.topicQueueTable.entrySet().iterator(); while (topicTableIt.hasNext()) { Entry<String, List<QueueData>> topicEntry = topicTableIt.next(); String topic = topicEntry.getKey(); List<QueueData> queueDatas = topicEntry.getValue(); if (queueDatas != null && queueDatas.size() > 0 && TopicSysFlag.hasUnitSubFlag(queueDatas.get(0).getTopicSynFlag())) { topicList.getTopicList().add(topic); } } } finally { this.lock.readLock().unlock(); } } catch (Exception e) { log.error("getAllTopicList Exception", e); } return topicList.encode(); }
Example 4
Source File: RouteInfoManager.java From reading-and-annotate-rocketmq-3.4.6 with GNU General Public License v3.0 | 5 votes |
public byte[] getHasUnitSubUnUnitTopicList() { TopicList topicList = new TopicList(); try { try { this.lock.readLock().lockInterruptibly(); Iterator<Entry<String, List<QueueData>>> topicTableIt = this.topicQueueTable.entrySet().iterator(); while (topicTableIt.hasNext()) { Entry<String, List<QueueData>> topicEntry = topicTableIt.next(); String topic = topicEntry.getKey(); List<QueueData> queueDatas = topicEntry.getValue(); if (queueDatas != null && queueDatas.size() > 0 && !TopicSysFlag.hasUnitFlag(queueDatas.get(0).getTopicSynFlag()) && TopicSysFlag.hasUnitSubFlag(queueDatas.get(0).getTopicSynFlag())) { topicList.getTopicList().add(topic); } } } finally { this.lock.readLock().unlock(); } } catch (Exception e) { log.error("getAllTopicList Exception", e); } return topicList.encode(); }
Example 5
Source File: RouteInfoManager.java From RocketMQ-Master-analyze with Apache License 2.0 | 5 votes |
/** * 获取中心向单元同步的所有 topic 列表 * * @return */ public byte[] getHasUnitSubTopicList() { TopicList topicList = new TopicList(); try { try { this.lock.readLock().lockInterruptibly(); Iterator<Entry<String, List<QueueData>>> topicTableIt = this.topicQueueTable.entrySet().iterator(); while (topicTableIt.hasNext()) { Entry<String, List<QueueData>> topicEntry = topicTableIt.next(); String topic = topicEntry.getKey(); List<QueueData> queueDatas = topicEntry.getValue(); if (queueDatas != null && queueDatas.size() > 0 && TopicSysFlag.hasUnitSubFlag(queueDatas.get(0).getTopicSynFlag())) { topicList.getTopicList().add(topic); } } } finally { this.lock.readLock().unlock(); } } catch (Exception e) { log.error("getAllTopicList Exception", e); } return topicList.encode(); }
Example 6
Source File: RouteInfoManager.java From RocketMQ-Master-analyze with Apache License 2.0 | 5 votes |
/** * 获取含有单元化订阅组的非单元化 Topic 列表 * * @return */ public byte[] getHasUnitSubUnUnitTopicList() { TopicList topicList = new TopicList(); try { try { this.lock.readLock().lockInterruptibly(); Iterator<Entry<String, List<QueueData>>> topicTableIt = this.topicQueueTable.entrySet().iterator(); while (topicTableIt.hasNext()) { Entry<String, List<QueueData>> topicEntry = topicTableIt.next(); String topic = topicEntry.getKey(); List<QueueData> queueDatas = topicEntry.getValue(); if (queueDatas != null && queueDatas.size() > 0 && !TopicSysFlag.hasUnitFlag(queueDatas.get(0).getTopicSynFlag()) && TopicSysFlag.hasUnitSubFlag(queueDatas.get(0).getTopicSynFlag())) { topicList.getTopicList().add(topic); } } } finally { this.lock.readLock().unlock(); } } catch (Exception e) { log.error("getAllTopicList Exception", e); } return topicList.encode(); }