com.taobao.metamorphosis.server
类 BrokerZooKeeper

java.lang.Object
  继承者 com.taobao.metamorphosis.server.BrokerZooKeeper
所有已实现的接口:
PropertyChangeListener, EventListener

public class BrokerZooKeeper
extends Object
implements PropertyChangeListener

Broker与ZK交互,注册broker和topic等

作者:
boyan, wuhua

构造方法摘要
BrokerZooKeeper(MetaConfig metaConfig)
           
 
方法摘要
 void close(boolean unregister)
           
 Broker getBroker()
           
 String getBrokerHostName()
           
 String getBrokerString()
           
 MetaZookeeper getMetaZookeeper()
           
 Set<String> getTopics()
           
 org.I0Itec.zkclient.ZkClient getZkClient()
           
 ZkUtils.ZKConfig getZkConfig()
           
 void propertyChange(PropertyChangeEvent evt)
           
 void registerBrokerInZk()
          注册broker到zk
 void registerMasterConfigFileChecksumInZk()
           
 void registerTopicInZk(String topic, boolean force)
          注册topic和分区信息到zk
 void reRegisterEveryThing()
           
 void resetBrokerIdPath()
          重新计算brokerIdPath
 void unregisterEveryThing()
           
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

构造方法详细信息

BrokerZooKeeper

public BrokerZooKeeper(MetaConfig metaConfig)
方法详细信息

getZkClient

public org.I0Itec.zkclient.ZkClient getZkClient()

propertyChange

public void propertyChange(PropertyChangeEvent evt)
指定者:
接口 PropertyChangeListener 中的 propertyChange

getMetaZookeeper

public MetaZookeeper getMetaZookeeper()

registerBrokerInZk

public void registerBrokerInZk()
                        throws Exception
注册broker到zk

抛出:
Exception

getBroker

public Broker getBroker()
                 throws Exception
抛出:
Exception

getBrokerString

public String getBrokerString()

getBrokerHostName

public String getBrokerHostName()
                         throws Exception
抛出:
Exception

registerMasterConfigFileChecksumInZk

public void registerMasterConfigFileChecksumInZk()
                                          throws Exception
抛出:
Exception

unregisterEveryThing

public void unregisterEveryThing()

registerTopicInZk

public void registerTopicInZk(String topic,
                              boolean force)
                       throws Exception
注册topic和分区信息到zk

参数:
topic -
force - TODO
抛出:
Exception

getZkConfig

public ZkUtils.ZKConfig getZkConfig()

getTopics

public Set<String> getTopics()

reRegisterEveryThing

public void reRegisterEveryThing()
                          throws Exception
抛出:
Exception

close

public void close(boolean unregister)

resetBrokerIdPath

public void resetBrokerIdPath()
重新计算brokerIdPath



Copyright © 2010–2013. All rights reserved.