public class NamingGrpcClientProxy extends AbstractNamingClientProxy
| 构造器和说明 |
|---|
NamingGrpcClientProxy(String namespaceId,
SecurityProxy securityProxy,
ServerListFactory serverListFactory,
Properties properties,
ServiceInfoHolder serviceInfoHolder) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
createService(Service service,
AbstractSelector selector)
Create service.
|
boolean |
deleteService(String serviceName,
String groupName)
Delete service.
|
void |
deregisterService(String serviceName,
String groupName,
Instance instance)
Deregister instance from a service.
|
void |
doDeregisterService(String serviceName,
String groupName,
Instance instance)
Execute deregister operation.
|
void |
doRegisterService(String serviceName,
String groupName,
Instance instance)
Execute register operation.
|
ServiceInfo |
doSubscribe(String serviceName,
String groupName,
String clusters)
Execute subscribe operation.
|
void |
doUnsubscribe(String serviceName,
String groupName,
String clusters)
Execute unsubscribe operation.
|
ListView<String> |
getServiceList(int pageNo,
int pageSize,
String groupName,
AbstractSelector selector)
Get service list.
|
boolean |
isEnable() |
void |
onEvent(ServerListChangedEvent event) |
ServiceInfo |
queryInstancesOfService(String serviceName,
String groupName,
String clusters,
int udpPort,
boolean healthyOnly)
Query instance list.
|
Service |
queryService(String serviceName,
String groupName)
Query Service.
|
void |
registerService(String serviceName,
String groupName,
Instance instance)
Register a instance to service with specified instance properties.
|
boolean |
serverHealthy()
Check Server healthy.
|
void |
shutdown() |
ServiceInfo |
subscribe(String serviceName,
String groupName,
String clusters)
Subscribe service.
|
Class<? extends Event> |
subscribeType() |
void |
unsubscribe(String serviceName,
String groupName,
String clusters)
Unsubscribe service.
|
void |
updateBeatInfo(Set<Instance> modifiedInstances)
Update beat info.
|
void |
updateInstance(String serviceName,
String groupName,
Instance instance)
Update instance to service.
|
void |
updateService(Service service,
AbstractSelector selector)
Update service.
|
getSecurityHeaders, getSpasHeadersexecutor, ignoreExpireEventpublic NamingGrpcClientProxy(String namespaceId, SecurityProxy securityProxy, ServerListFactory serverListFactory, Properties properties, ServiceInfoHolder serviceInfoHolder) throws NacosException
NacosExceptionpublic void onEvent(ServerListChangedEvent event)
onEvent 在类中 Subscriber<ServerListChangedEvent>public Class<? extends Event> subscribeType()
subscribeType 在类中 Subscriber<ServerListChangedEvent>public void registerService(String serviceName, String groupName, Instance instance) throws NacosException
NamingClientProxyserviceName - name of servicegroupName - group of serviceinstance - instance to registerNacosException - nacos exceptionpublic void doRegisterService(String serviceName, String groupName, Instance instance) throws NacosException
serviceName - name of servicegroupName - group of serviceinstance - instance to registerNacosException - nacos exceptionpublic void deregisterService(String serviceName, String groupName, Instance instance) throws NacosException
NamingClientProxyserviceName - name of servicegroupName - group nameinstance - instanceNacosException - nacos exceptionpublic void doDeregisterService(String serviceName, String groupName, Instance instance) throws NacosException
serviceName - service namegroupName - group nameinstance - instanceNacosException - nacos exceptionpublic void updateInstance(String serviceName, String groupName, Instance instance) throws NacosException
NamingClientProxyserviceName - service namegroupName - group nameinstance - instanceNacosException - nacos exceptionpublic ServiceInfo queryInstancesOfService(String serviceName, String groupName, String clusters, int udpPort, boolean healthyOnly) throws NacosException
NamingClientProxyserviceName - service namegroupName - group nameclusters - clustersudpPort - udp porthealthyOnly - healthy onlyNacosException - nacos exceptionpublic Service queryService(String serviceName, String groupName) throws NacosException
NamingClientProxyserviceName - service namegroupName - group nameNacosException - nacos exceptionpublic void createService(Service service, AbstractSelector selector) throws NacosException
NamingClientProxyservice - serviceselector - selectorNacosException - nacos exceptionpublic boolean deleteService(String serviceName, String groupName) throws NacosException
NamingClientProxyserviceName - service namegroupName - group nameNacosException - nacos exceptionpublic void updateService(Service service, AbstractSelector selector) throws NacosException
NamingClientProxyservice - serviceselector - selectorNacosException - nacos exceptionpublic ListView<String> getServiceList(int pageNo, int pageSize, String groupName, AbstractSelector selector) throws NacosException
NamingClientProxypageNo - page numberpageSize - size per pagegroupName - group name of serviceselector - selectorNacosException - nacos exceptionpublic ServiceInfo subscribe(String serviceName, String groupName, String clusters) throws NacosException
NamingClientProxyserviceName - service namegroupName - group nameclusters - clusters, current only support subscribe all clusters, maybe deprecatedNacosException - nacos exceptionpublic ServiceInfo doSubscribe(String serviceName, String groupName, String clusters) throws NacosException
serviceName - service namegroupName - group nameclusters - clusters, current only support subscribe all clusters, maybe deprecatedNacosException - nacos exceptionpublic void unsubscribe(String serviceName, String groupName, String clusters) throws NacosException
NamingClientProxyserviceName - service namegroupName - group nameclusters - clusters, current only support subscribe all clusters, maybe deprecatedNacosException - nacos exceptionpublic void doUnsubscribe(String serviceName, String groupName, String clusters) throws NacosException
serviceName - service namegroupName - group nameclusters - clusters, current only support subscribe all clusters, maybe deprecatedNacosException - nacos exceptionpublic void updateBeatInfo(Set<Instance> modifiedInstances)
NamingClientProxymodifiedInstances - modified instancespublic boolean serverHealthy()
NamingClientProxypublic void shutdown()
throws NacosException
NacosExceptionpublic boolean isEnable()
Copyright © 2018–2021 Alibaba Group. All rights reserved.