|
||||||||||
上一个类 下一个类 | 框架 无框架 | |||||||||
摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 |
java.lang.Object com.taobao.metamorphosis.client.producer.ProducerZooKeeper
public class ProducerZooKeeper
Producer和zk的交互
嵌套类摘要 | |
---|---|
static interface |
ProducerZooKeeper.BrokerChangeListener
When producer broker list is changed, it will notify the this listener. |
static class |
ProducerZooKeeper.BrokersInfo
|
构造方法摘要 | |
---|---|
ProducerZooKeeper(MetaZookeeper metaZookeeper,
RemotingClientWrapper remotingClient,
org.I0Itec.zkclient.ZkClient zkClient,
MetaClientConfig metaClientConfig)
|
方法摘要 | |
---|---|
void |
deregisterBrokerChangeListener(String topic,
ProducerZooKeeper.BrokerChangeListener listener)
|
void |
notifyBrokersChange(String topic)
|
void |
onBrokerChange(String topic,
ProducerZooKeeper.BrokerChangeListener listener)
|
void |
onZkClientChanged(org.I0Itec.zkclient.ZkClient newClient)
当新的zkClient建立的时候 |
void |
publishTopic(String topic,
Object ref)
|
String |
selectBroker(String topic,
Partition partition)
根据partition寻找broker url |
Partition |
selectPartition(String topic,
Message message,
PartitionSelector partitionSelector)
根据topic和message选择分区 |
void |
setDefaultTopic(String topic,
Object ref)
设置默认topic并发布 |
void |
unPublishTopic(String topic,
Object ref)
|
从类 java.lang.Object 继承的方法 |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
构造方法详细信息 |
---|
public ProducerZooKeeper(MetaZookeeper metaZookeeper, RemotingClientWrapper remotingClient, org.I0Itec.zkclient.ZkClient zkClient, MetaClientConfig metaClientConfig)
方法详细信息 |
---|
public void onBrokerChange(String topic, ProducerZooKeeper.BrokerChangeListener listener)
public void deregisterBrokerChangeListener(String topic, ProducerZooKeeper.BrokerChangeListener listener)
public void notifyBrokersChange(String topic)
public void publishTopic(String topic, Object ref)
public void unPublishTopic(String topic, Object ref)
public void setDefaultTopic(String topic, Object ref)
topic
- public String selectBroker(String topic, Partition partition)
topic
- message
-
public Partition selectPartition(String topic, Message message, PartitionSelector partitionSelector) throws MetaClientException
topic
- message
-
MetaClientException
public void onZkClientChanged(org.I0Itec.zkclient.ZkClient newClient)
ZkClientChangedListener
复制的描述
ZkClientChangedListener
中的 onZkClientChanged
|
||||||||||
上一个类 下一个类 | 框架 无框架 | |||||||||
摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 |