com.taobao.metamorphosis.cluster
类 Cluster
java.lang.Object
com.taobao.metamorphosis.cluster.Cluster
public class Cluster
- extends Object
Broker集群
- 作者:
- boyan, wuhua
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.