com.alibaba.rocketmq.client.consumer.rebalance
类 AllocateMessageQueueAveragelyByCircle

java.lang.Object
  继承者 com.alibaba.rocketmq.client.consumer.rebalance.AllocateMessageQueueAveragelyByCircle
所有已实现的接口:
AllocateMessageQueueStrategy

public class AllocateMessageQueueAveragelyByCircle
extends Object
implements AllocateMessageQueueStrategy

平均分配队列算法(环状)

从以下版本开始:
2014-09-10
作者:
manhong.yqd

构造方法摘要
AllocateMessageQueueAveragelyByCircle()
           
 
方法摘要
 List<MessageQueue> allocate(String consumerGroup, String currentCID, List<MessageQueue> mqAll, List<String> cidAll)
          给当前的ConsumerId分配队列
 String getName()
          rebalance 算法的名字
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

构造方法详细信息

AllocateMessageQueueAveragelyByCircle

public AllocateMessageQueueAveragelyByCircle()
方法详细信息

getName

public String getName()
从接口 AllocateMessageQueueStrategy 复制的描述
rebalance 算法的名字

指定者:
接口 AllocateMessageQueueStrategy 中的 getName
返回:

allocate

public List<MessageQueue> allocate(String consumerGroup,
                                   String currentCID,
                                   List<MessageQueue> mqAll,
                                   List<String> cidAll)
从接口 AllocateMessageQueueStrategy 复制的描述
给当前的ConsumerId分配队列

指定者:
接口 AllocateMessageQueueStrategy 中的 allocate
currentCID - 当前ConsumerId
mqAll - 当前Topic的所有队列集合,无重复数据,且有序
cidAll - 当前订阅组的所有Consumer集合,无重复数据,且有序
返回:
分配结果,无重复数据


Copyright © 2012-2015. All Rights Reserved.