com.taobao.metamorphosis.cluster
类 Broker

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

public class Broker
extends Object

表示一台meta服务器

作者:
boyan, wuhua

构造方法摘要
Broker(int id, String data)
           
Broker(int id, String host, int port)
           
Broker(int id, String host, int port, int slaveId)
           
 
方法摘要
 boolean equals(Object obj)
           
 String getHost()
           
 int getId()
           
 int getPort()
           
 int getSlaveId()
           
 String getZKString()
          返回broker节点数据字符串 meta://host:port
 int hashCode()
           
 boolean isSlave()
           
 void setHost(String host)
           
 void setId(int id)
           
 void setPort(int port)
           
 String toString()
           
 
从类 java.lang.Object 继承的方法
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

构造方法详细信息

Broker

public Broker(int id,
              String host,
              int port)

Broker

public Broker(int id,
              String host,
              int port,
              int slaveId)

Broker

public Broker(int id,
              String data)
参数:
id -
data - , meta://host:port or meta://host:port?slaveId=xx
方法详细信息

getZKString

public String getZKString()
返回broker节点数据字符串 meta://host:port

返回:

getId

public int getId()

setId

public void setId(int id)

getHost

public String getHost()

setHost

public void setHost(String host)

getPort

public int getPort()

setPort

public void setPort(int port)

isSlave

public boolean isSlave()

getSlaveId

public int getSlaveId()

toString

public String toString()
覆盖:
Object 中的 toString

hashCode

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

equals

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


Copyright © 2010–2013. All rights reserved.