com.taobao.metamorphosis.client.producer
类 AbstractPartitionSelector

java.lang.Object
  继承者 com.taobao.metamorphosis.client.producer.AbstractPartitionSelector
所有已实现的接口:
PartitionSelector
直接已知子类:
RandomPartitionSelector, RoundRobinPartitionSelector

public abstract class AbstractPartitionSelector
extends Object
implements PartitionSelector

Abstract partition selector.

作者:
apple

构造方法摘要
AbstractPartitionSelector()
           
 
方法摘要
 Partition getPartition(String topic, List<Partition> partitions, Message message)
          根据topic、message从partitions列表中选择分区
abstract  Partition getPartition0(String topic, List<Partition> partitions, Message message)
           
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

构造方法详细信息

AbstractPartitionSelector

public AbstractPartitionSelector()
方法详细信息

getPartition

public Partition getPartition(String topic,
                              List<Partition> partitions,
                              Message message)
                       throws MetaClientException
从接口 PartitionSelector 复制的描述
根据topic、message从partitions列表中选择分区

指定者:
接口 PartitionSelector 中的 getPartition
参数:
topic - topic
partitions - 分区列表
message - 消息
返回:
抛出:
MetaClientException - 此方法抛出的任何异常都应当包装为MetaClientException

getPartition0

public abstract Partition getPartition0(String topic,
                                        List<Partition> partitions,
                                        Message message)
                                 throws MetaClientException
抛出:
MetaClientException


Copyright © 2010–2013. All rights reserved.