类 SelfHostMetaServiceDiscovery
- java.lang.Object
-
- org.apache.dubbo.registry.client.SelfHostMetaServiceDiscovery
-
- 所有已实现的接口:
Comparable<Prioritized>,Prioritized,ServiceDiscovery
- 直接已知子类:
DNSServiceDiscovery,XdsServiceDiscovery
public abstract class SelfHostMetaServiceDiscovery extends Object implements ServiceDiscovery
-
-
字段概要
-
从接口继承的字段 org.apache.dubbo.common.lang.Prioritized
COMPARATOR, MAX_PRIORITY, MIN_PRIORITY, NORMAL_PRIORITY
-
-
构造器概要
构造器 构造器 说明 SelfHostMetaServiceDiscovery()
-
方法概要
所有方法 实例方法 具体方法 已过时的方法 修饰符和类型 方法 说明 voiddestroy()Destroy theServiceDiscoveryvoiddoDestroy()voiddoInitialize(URL registryURL)voiddoRegister(ServiceInstance serviceInstance)voiddoUnregister(ServiceInstance serviceInstance)voiddoUpdate(ServiceInstance serviceInstance)voidfillServiceInstance(DefaultServiceInstance serviceInstance)ConcurrentHashMap<String,List<ServiceInstance>>getCachedServiceInstances()已过时。ServiceInstancegetLocalInstance()URLgetUrl()voidinitialize(URL registryURL)Initializes theServiceDiscoverybooleanisDestroy()voidnotifyListener(String serviceName, ServiceInstancesChangedListener listener, List<ServiceInstance> instances)voidregister(ServiceInstance serviceInstance)Registers an instance ofServiceInstance.voidunregister(ServiceInstance serviceInstance)Unregisters an instance ofServiceInstance.voidupdate(ServiceInstance serviceInstance)Updates the registeredServiceInstance.-
从接口继承的方法 org.apache.dubbo.common.lang.Prioritized
compareTo, getPriority
-
从接口继承的方法 org.apache.dubbo.registry.client.ServiceDiscovery
addServiceInstancesChangedListener, createListener, dispatchServiceInstancesChangedEvent, dispatchServiceInstancesChangedEvent, dispatchServiceInstancesChangedEvent, dispatchServiceInstancesChangedEvent, getDefaultPageSize, getDelay, getInstances, getInstances, getInstances, getInstances, getServices, removeServiceInstancesChangedListener, toString
-
-
-
-
方法详细资料
-
initialize
public void initialize(URL registryURL) throws Exception
从接口复制的说明:ServiceDiscoveryInitializes theServiceDiscovery- 指定者:
initialize在接口中ServiceDiscovery- 参数:
registryURL- theurlto connect service registry- 抛出:
Exception- If met with error
-
destroy
public void destroy() throws Exception从接口复制的说明:ServiceDiscoveryDestroy theServiceDiscovery- 指定者:
destroy在接口中ServiceDiscovery- 抛出:
Exception- If met with error
-
isDestroy
public boolean isDestroy()
- 指定者:
isDestroy在接口中ServiceDiscovery
-
register
public void register(ServiceInstance serviceInstance) throws RuntimeException
从接口复制的说明:ServiceDiscoveryRegisters an instance ofServiceInstance.- 指定者:
register在接口中ServiceDiscovery- 参数:
serviceInstance- an instance ofServiceInstanceto be registered- 抛出:
RuntimeException- if failed
-
update
public void update(ServiceInstance serviceInstance) throws RuntimeException
从接口复制的说明:ServiceDiscoveryUpdates the registeredServiceInstance.- 指定者:
update在接口中ServiceDiscovery- 参数:
serviceInstance- the registeredServiceInstance- 抛出:
RuntimeException- if failed
-
unregister
public void unregister(ServiceInstance serviceInstance) throws RuntimeException
从接口复制的说明:ServiceDiscoveryUnregisters an instance ofServiceInstance.- 指定者:
unregister在接口中ServiceDiscovery- 参数:
serviceInstance- an instance ofServiceInstanceto be unregistered- 抛出:
RuntimeException- if failed
-
getLocalInstance
public ServiceInstance getLocalInstance()
- 指定者:
getLocalInstance在接口中ServiceDiscovery
-
getUrl
public URL getUrl()
- 指定者:
getUrl在接口中ServiceDiscovery
-
fillServiceInstance
public final void fillServiceInstance(DefaultServiceInstance serviceInstance)
-
notifyListener
public final void notifyListener(String serviceName, ServiceInstancesChangedListener listener, List<ServiceInstance> instances)
-
doRegister
public void doRegister(ServiceInstance serviceInstance) throws RuntimeException
- 抛出:
RuntimeException
-
doUpdate
public void doUpdate(ServiceInstance serviceInstance) throws RuntimeException
- 抛出:
RuntimeException
-
doUnregister
public void doUnregister(ServiceInstance serviceInstance) throws RuntimeException
- 抛出:
RuntimeException
-
getCachedServiceInstances
@Deprecated public final ConcurrentHashMap<String,List<ServiceInstance>> getCachedServiceInstances()
已过时。UT used only
-
-