public interface NamingService
| Modifier and Type | Method and Description |
|---|---|
void |
deregisterInstance(String serviceName,
Instance instance)
deregister instance with full instance information and default groupName
|
void |
deregisterInstance(String serviceName,
String groupName,
Instance instance)
deregister instance with full instance information
|
void |
deregisterInstance(String serviceName,
String ip,
int port)
deregister instance from a service
|
void |
deregisterInstance(String serviceName,
String ip,
int port,
String clusterName)
deregister instance with specified cluster name from a service
|
void |
deregisterInstance(String serviceName,
String groupName,
String ip,
int port)
deregister instance from a service
|
void |
deregisterInstance(String serviceName,
String groupName,
String ip,
int port,
String clusterName)
deregister instance with specified cluster name from a service
|
List<Instance> |
getAllInstances(String serviceName)
get all instances of a service
|
List<Instance> |
getAllInstances(String serviceName,
boolean subscribe)
Get all instances of a service
|
List<Instance> |
getAllInstances(String serviceName,
List<String> clusters)
Get all instances within specified clusters of a service
|
List<Instance> |
getAllInstances(String serviceName,
List<String> clusters,
boolean subscribe)
Get all instances within specified clusters of a service
|
List<Instance> |
getAllInstances(String serviceName,
String groupName)
get all instances of a service
|
List<Instance> |
getAllInstances(String serviceName,
String groupName,
boolean subscribe)
Get all instances of a service
|
List<Instance> |
getAllInstances(String serviceName,
String groupName,
List<String> clusters)
Get all instances within specified clusters of a service
|
List<Instance> |
getAllInstances(String serviceName,
String groupName,
List<String> clusters,
boolean subscribe)
Get all instances within specified clusters of a service
|
String |
getServerStatus()
get server health status
|
ListView<String> |
getServicesOfServer(int pageNo,
int pageSize)
Get all service names from server
|
ListView<String> |
getServicesOfServer(int pageNo,
int pageSize,
AbstractSelector selector)
Get all service names from server with selector
|
ListView<String> |
getServicesOfServer(int pageNo,
int pageSize,
String groupName)
Get all service names from server
|
ListView<String> |
getServicesOfServer(int pageNo,
int pageSize,
String groupName,
AbstractSelector selector)
Get all service names from server with selector
|
List<ServiceInfo> |
getSubscribeServices()
Get all subscribed services of current client
|
void |
registerInstance(String serviceName,
Instance instance)
register a instance to service with specified instance properties
|
void |
registerInstance(String serviceName,
String groupName,
Instance instance)
register a instance to service with specified instance properties
|
void |
registerInstance(String serviceName,
String ip,
int port)
register a instance to service
|
void |
registerInstance(String serviceName,
String ip,
int port,
String clusterName)
register a instance to service with specified cluster name
|
void |
registerInstance(String serviceName,
String groupName,
String ip,
int port)
register a instance to service
|
void |
registerInstance(String serviceName,
String groupName,
String ip,
int port,
String clusterName)
register a instance to service with specified cluster name
|
List<Instance> |
selectInstances(String serviceName,
boolean healthy)
Get qualified instances of service
|
List<Instance> |
selectInstances(String serviceName,
boolean healthy,
boolean subscribe)
Get qualified instances of service
|
List<Instance> |
selectInstances(String serviceName,
List<String> clusters,
boolean healthy)
Get qualified instances within specified clusters of service
|
List<Instance> |
selectInstances(String serviceName,
List<String> clusters,
boolean healthy,
boolean subscribe)
Get qualified instances within specified clusters of service
|
List<Instance> |
selectInstances(String serviceName,
String groupName,
boolean healthy)
Get qualified instances of service
|
List<Instance> |
selectInstances(String serviceName,
String groupName,
boolean healthy,
boolean subscribe)
Get qualified instances of service
|
List<Instance> |
selectInstances(String serviceName,
String groupName,
List<String> clusters,
boolean healthy)
Get qualified instances within specified clusters of service
|
List<Instance> |
selectInstances(String serviceName,
String groupName,
List<String> clusters,
boolean healthy,
boolean subscribe)
Get qualified instances within specified clusters of service
|
Instance |
selectOneHealthyInstance(String serviceName)
Select one healthy instance of service using predefined load balance strategy
|
Instance |
selectOneHealthyInstance(String serviceName,
boolean subscribe)
select one healthy instance of service using predefined load balance strategy
|
Instance |
selectOneHealthyInstance(String serviceName,
List<String> clusters)
Select one healthy instance of service using predefined load balance strategy
|
Instance |
selectOneHealthyInstance(String serviceName,
List<String> clusters,
boolean subscribe)
Select one healthy instance of service using predefined load balance strategy
|
Instance |
selectOneHealthyInstance(String serviceName,
String groupName)
Select one healthy instance of service using predefined load balance strategy
|
Instance |
selectOneHealthyInstance(String serviceName,
String groupName,
boolean subscribe)
select one healthy instance of service using predefined load balance strategy
|
Instance |
selectOneHealthyInstance(String serviceName,
String groupName,
List<String> clusters)
Select one healthy instance of service using predefined load balance strategy
|
Instance |
selectOneHealthyInstance(String serviceName,
String groupName,
List<String> clusters,
boolean subscribe)
Select one healthy instance of service using predefined load balance strategy
|
void |
subscribe(String serviceName,
EventListener listener)
Subscribe service to receive events of instances alteration
|
void |
subscribe(String serviceName,
List<String> clusters,
EventListener listener)
Subscribe service to receive events of instances alteration
|
void |
subscribe(String serviceName,
String groupName,
EventListener listener)
Subscribe service to receive events of instances alteration
|
void |
subscribe(String serviceName,
String groupName,
List<String> clusters,
EventListener listener)
Subscribe service to receive events of instances alteration
|
void |
unsubscribe(String serviceName,
EventListener listener)
Unsubscribe event listener of service
|
void |
unsubscribe(String serviceName,
List<String> clusters,
EventListener listener)
Unsubscribe event listener of service
|
void |
unsubscribe(String serviceName,
String groupName,
EventListener listener)
unsubscribe event listener of service
|
void |
unsubscribe(String serviceName,
String groupName,
List<String> clusters,
EventListener listener)
Unsubscribe event listener of service
|
void registerInstance(String serviceName, String ip, int port) throws NacosException
serviceName - name of serviceip - instance ipport - instance portNacosExceptionvoid registerInstance(String serviceName, String groupName, String ip, int port) throws NacosException
serviceName - name of servicegroupName - group of serviceip - instance ipport - instance portNacosExceptionvoid registerInstance(String serviceName, String ip, int port, String clusterName) throws NacosException
serviceName - name of serviceip - instance ipport - instance portclusterName - instance cluster nameNacosExceptionvoid registerInstance(String serviceName, String groupName, String ip, int port, String clusterName) throws NacosException
serviceName - name of servicegroupName - group of serviceip - instance ipport - instance portclusterName - instance cluster nameNacosExceptionvoid registerInstance(String serviceName, Instance instance) throws NacosException
serviceName - name of serviceinstance - instance to registerNacosExceptionvoid registerInstance(String serviceName, String groupName, Instance instance) throws NacosException
serviceName - name of servicegroupName - group of serviceinstance - instance to registerNacosExceptionvoid deregisterInstance(String serviceName, String ip, int port) throws NacosException
serviceName - name of serviceip - instance ipport - instance portNacosExceptionvoid deregisterInstance(String serviceName, String groupName, String ip, int port) throws NacosException
serviceName - name of servicegroupName - group of serviceip - instance ipport - instance portNacosExceptionvoid deregisterInstance(String serviceName, String ip, int port, String clusterName) throws NacosException
serviceName - name of serviceip - instance ipport - instance portclusterName - instance cluster nameNacosExceptionvoid deregisterInstance(String serviceName, String groupName, String ip, int port, String clusterName) throws NacosException
serviceName - name of servicegroupName - group of serviceip - instance ipport - instance portclusterName - instance cluster nameNacosExceptionvoid deregisterInstance(String serviceName, Instance instance) throws NacosException
serviceName - instance - NacosExceptionvoid deregisterInstance(String serviceName, String groupName, Instance instance) throws NacosException
serviceName - name of servicegroupName - group of serviceinstance - instance informationNacosExceptionList<Instance> getAllInstances(String serviceName) throws NacosException
serviceName - name of serviceNacosExceptionList<Instance> getAllInstances(String serviceName, String groupName) throws NacosException
serviceName - name of servicegroupName - group of serviceNacosExceptionList<Instance> getAllInstances(String serviceName, boolean subscribe) throws NacosException
serviceName - name of servicesubscribe - if subscribe the serviceNacosExceptionList<Instance> getAllInstances(String serviceName, String groupName, boolean subscribe) throws NacosException
serviceName - name of servicegroupName - group of servicesubscribe - if subscribe the serviceNacosExceptionList<Instance> getAllInstances(String serviceName, List<String> clusters) throws NacosException
serviceName - name of serviceclusters - list of clusterNacosExceptionList<Instance> getAllInstances(String serviceName, String groupName, List<String> clusters) throws NacosException
serviceName - name of servicegroupName - group of serviceclusters - list of clusterNacosExceptionList<Instance> getAllInstances(String serviceName, List<String> clusters, boolean subscribe) throws NacosException
serviceName - name of serviceclusters - list of clustersubscribe - if subscribe the serviceNacosExceptionList<Instance> getAllInstances(String serviceName, String groupName, List<String> clusters, boolean subscribe) throws NacosException
serviceName - name of servicegroupName - group of serviceclusters - list of clustersubscribe - if subscribe the serviceNacosExceptionList<Instance> selectInstances(String serviceName, boolean healthy) throws NacosException
serviceName - name of servicehealthy - a flag to indicate returning healthy or unhealthy instancesNacosExceptionList<Instance> selectInstances(String serviceName, String groupName, boolean healthy) throws NacosException
serviceName - name of servicegroupName - group of servicehealthy - a flag to indicate returning healthy or unhealthy instancesNacosExceptionList<Instance> selectInstances(String serviceName, boolean healthy, boolean subscribe) throws NacosException
serviceName - name of servicehealthy - a flag to indicate returning healthy or unhealthy instancessubscribe - if subscribe the serviceNacosExceptionList<Instance> selectInstances(String serviceName, String groupName, boolean healthy, boolean subscribe) throws NacosException
serviceName - name of servicegroupName - group of servicehealthy - a flag to indicate returning healthy or unhealthy instancessubscribe - if subscribe the serviceNacosExceptionList<Instance> selectInstances(String serviceName, List<String> clusters, boolean healthy) throws NacosException
serviceName - name of serviceclusters - list of clusterhealthy - a flag to indicate returning healthy or unhealthy instancesNacosExceptionList<Instance> selectInstances(String serviceName, String groupName, List<String> clusters, boolean healthy) throws NacosException
serviceName - name of servicegroupName - group of serviceclusters - list of clusterhealthy - a flag to indicate returning healthy or unhealthy instancesNacosExceptionList<Instance> selectInstances(String serviceName, List<String> clusters, boolean healthy, boolean subscribe) throws NacosException
serviceName - name of serviceclusters - list of clusterhealthy - a flag to indicate returning healthy or unhealthy instancessubscribe - if subscribe the serviceNacosExceptionList<Instance> selectInstances(String serviceName, String groupName, List<String> clusters, boolean healthy, boolean subscribe) throws NacosException
serviceName - name of servicegroupName - group of serviceclusters - list of clusterhealthy - a flag to indicate returning healthy or unhealthy instancessubscribe - if subscribe the serviceNacosExceptionInstance selectOneHealthyInstance(String serviceName) throws NacosException
serviceName - name of serviceNacosExceptionInstance selectOneHealthyInstance(String serviceName, String groupName) throws NacosException
serviceName - name of servicegroupName - group of serviceNacosExceptionInstance selectOneHealthyInstance(String serviceName, boolean subscribe) throws NacosException
serviceName - name of servicesubscribe - if subscribe the serviceNacosExceptionInstance selectOneHealthyInstance(String serviceName, String groupName, boolean subscribe) throws NacosException
serviceName - name of servicegroupName - group of servicesubscribe - if subscribe the serviceNacosExceptionInstance selectOneHealthyInstance(String serviceName, List<String> clusters) throws NacosException
serviceName - name of serviceclusters - a list of clusters should the instance belongs toNacosExceptionInstance selectOneHealthyInstance(String serviceName, String groupName, List<String> clusters) throws NacosException
serviceName - name of servicegroupName - group of serviceclusters - a list of clusters should the instance belongs toNacosExceptionInstance selectOneHealthyInstance(String serviceName, List<String> clusters, boolean subscribe) throws NacosException
serviceName - name of serviceclusters - a list of clusters should the instance belongs tosubscribe - if subscribe the serviceNacosExceptionInstance selectOneHealthyInstance(String serviceName, String groupName, List<String> clusters, boolean subscribe) throws NacosException
serviceName - name of servicegroupName - group of serviceclusters - a list of clusters should the instance belongs tosubscribe - if subscribe the serviceNacosExceptionvoid subscribe(String serviceName, EventListener listener) throws NacosException
serviceName - name of servicelistener - event listenerNacosExceptionvoid subscribe(String serviceName, String groupName, EventListener listener) throws NacosException
serviceName - name of servicegroupName - group of servicelistener - event listenerNacosExceptionvoid subscribe(String serviceName, List<String> clusters, EventListener listener) throws NacosException
serviceName - name of serviceclusters - list of clusterlistener - event listenerNacosExceptionvoid subscribe(String serviceName, String groupName, List<String> clusters, EventListener listener) throws NacosException
serviceName - name of servicegroupName - group of serviceclusters - list of clusterlistener - event listenerNacosExceptionvoid unsubscribe(String serviceName, EventListener listener) throws NacosException
serviceName - name of servicelistener - event listenerNacosExceptionvoid unsubscribe(String serviceName, String groupName, EventListener listener) throws NacosException
serviceName - name of servicegroupName - group of servicelistener - event listenerNacosExceptionvoid unsubscribe(String serviceName, List<String> clusters, EventListener listener) throws NacosException
serviceName - name of serviceclusters - list of clusterlistener - event listenerNacosExceptionvoid unsubscribe(String serviceName, String groupName, List<String> clusters, EventListener listener) throws NacosException
serviceName - name of servicegroupName - group of serviceclusters - list of clusterlistener - event listenerNacosExceptionListView<String> getServicesOfServer(int pageNo, int pageSize) throws NacosException
pageNo - page indexpageSize - page sizeNacosExceptionListView<String> getServicesOfServer(int pageNo, int pageSize, String groupName) throws NacosException
pageNo - page indexpageSize - page sizegroupName - group nameNacosExceptionListView<String> getServicesOfServer(int pageNo, int pageSize, AbstractSelector selector) throws NacosException
pageNo - page indexpageSize - page sizeselector - selector to filter the resourceNacosExceptionListView<String> getServicesOfServer(int pageNo, int pageSize, String groupName, AbstractSelector selector) throws NacosException
pageNo - page indexpageSize - page sizegroupName - group nameselector - selector to filter the resourceNacosExceptionList<ServiceInfo> getSubscribeServices() throws NacosException
NacosExceptionString getServerStatus()
Copyright © 2018–2019 Alibaba Group. All rights reserved.