接口 NamingMaintainService
public interface NamingMaintainService
Operations related to Nacos.
- 从以下版本开始:
- 1.0.1
- 作者:
- liaochuntao
-
方法概要
修饰符和类型方法说明voidcreateService(Service service, AbstractSelector selector)create service to Nacos.voidcreateService(String serviceName)create service to Nacos.voidcreateService(String serviceName, String groupName)create service to Nacos.voidcreateService(String serviceName, String groupName, float protectThreshold)create service to Nacos.voidcreateService(String serviceName, String groupName, float protectThreshold, String expression)create service to Nacos.booleandeleteService(String serviceName)delete service from Nacos.booleandeleteService(String serviceName, String groupName)delete service from Nacos.queryService(String serviceName)query service.queryService(String serviceName, String groupName)query service.voidshutDown()Shutdown the resource service.voidupdateInstance(String serviceName, Instance instance)update instance info.voidupdateInstance(String serviceName, String groupName, Instance instance)update instance info.voidupdateService(Service service, AbstractSelector selector)update service to Nacos with selector.voidupdateService(String serviceName, String groupName, float protectThreshold)update service to Nacos.voidupdateService(String serviceName, String groupName, float protectThreshold, Map<String,String> metadata)update service to Nacos.
-
方法详细资料
-
updateInstance
update instance info.- 参数:
serviceName- service nameinstance- instance- 抛出:
NacosException- nacos exception
-
updateInstance
update instance info.- 参数:
serviceName- service namegroupName- group nameinstance- instance- 抛出:
NacosException- nacos exception
-
queryService
query service.- 参数:
serviceName- service name- 返回:
- service
- 抛出:
NacosException- nacos exception
-
queryService
query service.- 参数:
serviceName- service namegroupName- group name- 返回:
- service
- 抛出:
NacosException- nacos exception
-
createService
create service to Nacos.- 参数:
serviceName- name of service- 抛出:
NacosException- nacos exception
-
createService
create service to Nacos.- 参数:
serviceName- name of servicegroupName- group of service- 抛出:
NacosException- nacos exception
-
createService
void createService(String serviceName, String groupName, float protectThreshold) throws NacosExceptioncreate service to Nacos.- 参数:
serviceName- name of servicegroupName- group of serviceprotectThreshold- protectThreshold of service- 抛出:
NacosException- nacos exception
-
createService
void createService(String serviceName, String groupName, float protectThreshold, String expression) throws NacosExceptioncreate service to Nacos.- 参数:
serviceName- name of servicegroupName- group of serviceprotectThreshold- protectThreshold of serviceexpression- expression of selector- 抛出:
NacosException- nacos exception
-
createService
create service to Nacos.- 参数:
service- name of serviceselector- selector- 抛出:
NacosException- nacos exception
-
deleteService
delete service from Nacos.- 参数:
serviceName- name of service- 返回:
- if delete service success return true
- 抛出:
NacosException- nacos exception
-
deleteService
delete service from Nacos.- 参数:
serviceName- name of servicegroupName- group of service- 返回:
- if delete service success return true
- 抛出:
NacosException- nacos exception
-
updateService
void updateService(String serviceName, String groupName, float protectThreshold) throws NacosExceptionupdate service to Nacos.- 参数:
serviceName- name of servicegroupName- group of serviceprotectThreshold- protectThreshold of service- 抛出:
NacosException- nacos exception
-
updateService
void updateService(String serviceName, String groupName, float protectThreshold, Map<String,String> metadata) throws NacosExceptionupdate service to Nacos.- 参数:
serviceName- name of servicegroupName- group of serviceprotectThreshold- protectThreshold of servicemetadata- metadata of service- 抛出:
NacosException- nacos exception
-
updateService
update service to Nacos with selector.- 参数:
service-Servicepojo of serviceselector-AbstractSelectorpojo of selector- 抛出:
NacosException- nacos exception
-
shutDown
Shutdown the resource service.- 抛出:
NacosException- exception.
-