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
从类 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
- topicpartitions
- 分区列表message
- 消息
- 返回:
-
- 抛出:
MetaClientException
- 此方法抛出的任何异常都应当包装为MetaClientException
getPartition0
public abstract Partition getPartition0(String topic,
List<Partition> partitions,
Message message)
throws MetaClientException
- 抛出:
MetaClientException
Copyright © 2010–2013. All rights reserved.