com.taobao.metamorphosis.client.consumer
类 ConsumerZooKeeper
java.lang.Object
com.taobao.metamorphosis.client.consumer.ConsumerZooKeeper
- 所有已实现的接口:
- ZkClientChangedListener
- 直接已知子类:
- SlaveConsumerZooKeeper
public class ConsumerZooKeeper
- extends Object
- implements ZkClientChangedListener
Consumer与Zookeeper交互
- 作者:
- boyan, wuhua
从类 java.lang.Object 继承的方法 |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
zkClient
protected org.I0Itec.zkclient.ZkClient zkClient
consumerLoadBalanceListeners
protected final ConcurrentHashMap<FetchManager,FutureTask<ConsumerZooKeeper.ZKLoadRebalanceListener>> consumerLoadBalanceListeners
metaZookeeper
protected final MetaZookeeper metaZookeeper
ConsumerZooKeeper
public ConsumerZooKeeper(MetaZookeeper metaZookeeper,
RemotingClientWrapper remotingClient,
org.I0Itec.zkclient.ZkClient zkClient,
ZkUtils.ZKConfig zkConfig)
commitOffsets
public void commitOffsets(FetchManager fetchManager)
getBrokerConnectionListener
public ConsumerZooKeeper.ZKLoadRebalanceListener getBrokerConnectionListener(FetchManager fetchManager)
unRegisterConsumer
public void unRegisterConsumer(FetchManager fetchManager)
- 取消注册consumer
- 参数:
fetchManager
-
registerConsumer
public void registerConsumer(ConsumerConfig consumerConfig,
FetchManager fetchManager,
ConcurrentHashMap<String,SubscriberInfo> topicSubcriberRegistry,
OffsetStorage offsetStorage,
LoadBalanceStrategy loadBalanceStrategy)
throws Exception
- 注册订阅者
- 抛出:
Exception
registerConsumerInternal
protected ConsumerZooKeeper.ZKLoadRebalanceListener registerConsumerInternal(ConsumerZooKeeper.ZKLoadRebalanceListener loadBalanceListener)
throws UnknownHostException,
InterruptedException,
Exception
- 抛出:
UnknownHostException
InterruptedException
Exception
getConsumerUUID
protected String getConsumerUUID(ConsumerConfig consumerConfig)
throws Exception
- 抛出:
Exception
onZkClientChanged
public void onZkClientChanged(org.I0Itec.zkclient.ZkClient newClient)
- 从接口
ZkClientChangedListener
复制的描述
- 当新的zkClient建立的时候
- 指定者:
- 接口
ZkClientChangedListener
中的 onZkClientChanged
Copyright © 2010–2013. All rights reserved.