类 FileSystemServiceDiscovery
- java.lang.Object
-
- org.apache.dubbo.registry.client.AbstractServiceDiscovery
-
- org.apache.dubbo.registry.client.FileSystemServiceDiscovery
-
- 所有已实现的接口:
Comparable<Prioritized>,EventListener,Prioritized,EventListener<ServiceInstancesChangedEvent>,ServiceDiscovery
public class FileSystemServiceDiscovery extends AbstractServiceDiscovery implements EventListener<ServiceInstancesChangedEvent>
File SystemServiceDiscoveryimplementation- 从以下版本开始:
- 2.7.5
- 另请参阅:
FileSystemDynamicConfiguration
-
-
字段概要
-
从接口继承的字段 org.apache.dubbo.common.lang.Prioritized
COMPARATOR, MAX_PRIORITY, MIN_PRIORITY, NORMAL_PRIORITY
-
-
构造器概要
构造器 构造器 说明 FileSystemServiceDiscovery()
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 voiddestroy()Destroy theServiceDiscoveryvoiddoRegister(ServiceInstance serviceInstance)It should be implement in kinds of service discovers.voiddoUpdate(ServiceInstance serviceInstance)It should be implement in kinds of service discovers.List<ServiceInstance>getInstances(String serviceName)Gets allservice instancesby the specified service name.Set<String>getServices()Gets all service namesURLgetUrl()voidinitialize(URL registryURL)Initializes theServiceDiscoveryvoidonConfigChanged(ConfigChangedEvent event)voidonEvent(ServiceInstancesChangedEvent event)voidunregister(ServiceInstance serviceInstance)Unregisters an instance ofServiceInstance.-
从类继承的方法 org.apache.dubbo.registry.client.AbstractServiceDiscovery
getLocalInstance, register, update
-
从接口继承的方法 org.apache.dubbo.event.EventListener
getPriority
-
从接口继承的方法 org.apache.dubbo.common.lang.Prioritized
compareTo
-
从接口继承的方法 org.apache.dubbo.registry.client.ServiceDiscovery
addServiceInstancesChangedListener, dispatchServiceInstancesChangedEvent, dispatchServiceInstancesChangedEvent, dispatchServiceInstancesChangedEvent, dispatchServiceInstancesChangedEvent, getDefaultPageSize, getInstances, getInstances, getInstances, removeServiceInstancesChangedListener, toString
-
-
-
-
方法详细资料
-
onEvent
public void onEvent(ServiceInstancesChangedEvent event)
- 指定者:
onEvent在接口中EventListener<ServiceInstancesChangedEvent>
-
initialize
public void initialize(URL registryURL) throws Exception
从接口复制的说明:ServiceDiscoveryInitializes theServiceDiscovery- 指定者:
initialize在接口中ServiceDiscovery- 参数:
registryURL- theurlto connect service registry- 抛出:
Exception- If met with error
-
onConfigChanged
public void onConfigChanged(ConfigChangedEvent event)
-
destroy
public void destroy() throws Exception从接口复制的说明:ServiceDiscoveryDestroy theServiceDiscovery- 指定者:
destroy在接口中ServiceDiscovery- 抛出:
Exception- If met with error
-
getInstances
public List<ServiceInstance> getInstances(String serviceName)
从接口复制的说明:ServiceDiscoveryGets allservice instancesby the specified service name.- 指定者:
getInstances在接口中ServiceDiscovery- 参数:
serviceName- the service name- 返回:
- non-null
List
-
getUrl
public URL getUrl()
- 指定者:
getUrl在接口中ServiceDiscovery
-
doRegister
public void doRegister(ServiceInstance serviceInstance)
从类复制的说明:AbstractServiceDiscoveryIt should be implement in kinds of service discovers.- 指定者:
doRegister在类中AbstractServiceDiscovery
-
doUpdate
public void doUpdate(ServiceInstance serviceInstance)
从类复制的说明:AbstractServiceDiscoveryIt should be implement in kinds of service discovers.- 指定者:
doUpdate在类中AbstractServiceDiscovery
-
unregister
public void unregister(ServiceInstance serviceInstance) throws RuntimeException
从接口复制的说明:ServiceDiscoveryUnregisters an instance ofServiceInstance.- 指定者:
unregister在接口中ServiceDiscovery- 参数:
serviceInstance- an instance ofServiceInstanceto be unregistered- 抛出:
RuntimeException- if failed
-
getServices
public Set<String> getServices()
从接口复制的说明:ServiceDiscoveryGets all service names- 指定者:
getServices在接口中ServiceDiscovery- 返回:
- non-null read-only
Set
-
-