|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
java.lang.Objectcom.baidu.driver4j.bns.BNSQueryProxy
com.baidu.driver4j.bns.BNSProxy
public class BNSProxy
BNS API operation access proxy class.
This is the main entry class for all operation access for BNS.
| 字段摘要 | |
|---|---|
protected String |
authKey
|
protected SimpleHttpRequestExecutor |
simpleHttpRequestExecutor
|
| 从类 com.baidu.driver4j.bns.BNSQueryProxy 继承的字段 |
|---|
bnsServerUrl, connectTimeout, DEFAULT_BNS_SERVER, GROUP_OPER, groupOperUrl, INSTANCE_OPER, instanceOperUrl, PARAM_JOINER, PARAM_MARK, readTimeout, serivceOperUrl, SERVICE_OPER |
| 构造方法摘要 | |
|---|---|
protected |
BNSProxy(String bnsServerUrl,
String authKey)
|
| 方法摘要 | |
|---|---|
void |
addInstance(String serviceName,
Instance instance)
add instance under target service name |
void |
addInstances(String serviceName,
List<Instance> intances)
批量增加实例 |
void |
addMachineNames(String serviceName,
List<String> machinenames,
boolean disable)
批量增加机器 |
boolean |
checkAuthorize(String nodePath)
验证token对节点路径是否有操作权限 |
void |
createService(Service service)
创建服务 |
void |
createService(Service service,
boolean dummyExist)
创建服务 |
void |
createServiceGroup(Group group)
新建服务组 |
void |
createServiceGroup(Group group,
boolean dummyExist)
新建服务组 |
protected String |
getAuthKey()
|
static BNSProxy |
proxy()
|
static BNSProxy |
proxy(String authKey)
|
static BNSProxy |
proxy(String bnsServerUrl,
String authKey)
|
void |
removeAllInstances(String serviceName)
删除服务下所有实例 |
void |
removeInstance(String serviceName,
String hostName)
删除实例 |
void |
removeInstance(String serviceName,
String hostName,
int instanceId)
删除实例 |
void |
removeService(String serviceName)
删除服务 |
void |
removeServiceGroup(String name)
删除服务组 |
void |
setMaxBatchAddSize(int maxBatchAddSize)
|
void |
updateInstance(String serviceName,
Instance instance)
修改实例的各种信息 |
void |
updateInstance(String serviceName,
Instance instance,
boolean ignoreNull)
修改实例的各种信息 |
void |
updateService(Service service)
更新服务详情 |
| 从类 java.lang.Object 继承的方法 |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| 字段详细信息 |
|---|
protected String authKey
protected SimpleHttpRequestExecutor simpleHttpRequestExecutor
| 构造方法详细信息 |
|---|
protected BNSProxy(String bnsServerUrl,
String authKey)
| 方法详细信息 |
|---|
public static BNSProxy proxy(String bnsServerUrl,
String authKey)
public static BNSProxy proxy(String authKey)
public static BNSProxy proxy()
public void createService(Service service)
throws BNSException
service - Service instance
BNSException - in case of access BNS service failed
public void createService(Service service,
boolean dummyExist)
throws BNSException
service - Service instancedummyExist - if true will not check service name exist
BNSException - in case of access BNS service failed
public void removeService(String serviceName)
throws BNSException
serviceName - service name
BNSException - in case of access BNS service failed
public void updateService(Service service)
throws BNSException
service - service instance must specified service name
BNSException - in case of access BNS service failed
public void addInstance(String serviceName,
Instance instance)
throws BNSException
serviceName - service nameinstance - instance info
BNSException - in case of access BNS service failed
public void addInstances(String serviceName,
List<Instance> intances)
throws BNSException
serviceName - 服务名intances - 批量新增实现列表
BNSException - in case of access BNS service failed
public void updateInstance(String serviceName,
Instance instance)
throws BNSException
serviceName - 服务名instance - 实例信息
BNSException - in case of access BNS service failed
public void updateInstance(String serviceName,
Instance instance,
boolean ignoreNull)
throws BNSException
serviceName - 服务名instance - 实例信息ignoreNull - set true will ignore null value
BNSException - in case of access BNS service failed
public void removeAllInstances(String serviceName)
throws BNSException
serviceName - the name of service
BNSException - in case of access BNS service failed
public void removeInstance(String serviceName,
String hostName,
int instanceId)
throws BNSException
serviceName - name of servicehostName - the host name of target machineinstanceId - 实例id(可选) ,若不指定,则删除 机器上 此服务的所有实例
BNSException - in case of access BNS service failed
public void removeInstance(String serviceName,
String hostName)
throws BNSException
serviceName - name of servicehostName - the host name of target machine
BNSException - in case of access BNS service failed
public void addMachineNames(String serviceName,
List<String> machinenames,
boolean disable)
throws BNSException
serviceName - service namemachinenames - machine namesdisable - disable for add machine name
BNSException - in case of access BNS service failed
public boolean checkAuthorize(String nodePath)
throws BNSException
nodePath - 节点路径
BNSException - in case of access BNS service failed
public void createServiceGroup(Group group)
throws BNSException
group - group instance
BNSException - in case of access BNS service failed
public void createServiceGroup(Group group,
boolean dummyExist)
throws BNSException
group - group instancedummyExist - if true will not check group name exist
BNSException - in case of access BNS service failed
public void removeServiceGroup(String name)
throws BNSException
name - group name
BNSException - in case of access BNS service failedprotected String getAuthKey()
public void setMaxBatchAddSize(int maxBatchAddSize)
|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||