com.taobao.metamorphosis.cluster
类 Cluster

java.lang.Object
  继承者 com.taobao.metamorphosis.cluster.Cluster

public class Cluster
extends Object

Broker集群

作者:
boyan, wuhua

构造方法摘要
Cluster()
           
 
方法摘要
 void addBroker(int id, Broker broker)
           
 void addBroker(int id, Set<Broker> brokers)
           
 boolean equals(Object obj)
           
 Broker getBrokerRandom(int id)
           
 ConcurrentHashMap<Integer,Set<Broker>> getBrokers()
           
 Broker getMasterBroker(int id)
           
 int hashCode()
           
 Cluster masterCluster()
           
 Set<Broker> remove(int id)
           
 int size()
          返回broker总数,包括master和slave
 
从类 java.lang.Object 继承的方法
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

构造方法详细信息

Cluster

public Cluster()
方法详细信息

getBrokers

public ConcurrentHashMap<Integer,Set<Broker>> getBrokers()

size

public int size()
返回broker总数,包括master和slave


getBrokerRandom

public Broker getBrokerRandom(int id)

getMasterBroker

public Broker getMasterBroker(int id)

addBroker

public void addBroker(int id,
                      Broker broker)

addBroker

public void addBroker(int id,
                      Set<Broker> brokers)

remove

public Set<Broker> remove(int id)

masterCluster

public Cluster masterCluster()

equals

public boolean equals(Object obj)
覆盖:
Object 中的 equals

hashCode

public int hashCode()
覆盖:
Object 中的 hashCode


Copyright © 2010–2013. All rights reserved.