public class ZookeeperServiceDiscovery extends Object implements ServiceDiscovery, org.apache.dubbo.event.EventListener<ServiceInstancesChangedEvent>
ServiceDiscovery implementation based on
Apache Curator X Discovery| Constructor and Description |
|---|
ZookeeperServiceDiscovery() |
| Modifier and Type | Method and Description |
|---|---|
void |
addServiceInstancesChangedListener(ServiceInstancesChangedListener listener) |
void |
destroy() |
List<ServiceInstance> |
getInstances(String serviceName) |
org.apache.dubbo.common.utils.Page<ServiceInstance> |
getInstances(String serviceName,
int offset,
int pageSize,
boolean healthyOnly) |
Set<String> |
getServices() |
void |
initialize(org.apache.dubbo.common.URL registryURL) |
void |
onEvent(ServiceInstancesChangedEvent event) |
void |
register(ServiceInstance serviceInstance) |
void |
unregister(ServiceInstance serviceInstance) |
void |
update(ServiceInstance serviceInstance) |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdispatchServiceInstancesChangedEvent, dispatchServiceInstancesChangedEvent, dispatchServiceInstancesChangedEvent, dispatchServiceInstancesChangedEvent, getDefaultPageSize, getInstances, getInstances, toStringpublic void initialize(org.apache.dubbo.common.URL registryURL)
throws Exception
initialize in interface ServiceDiscoveryExceptionpublic void destroy()
throws Exception
destroy in interface ServiceDiscoveryExceptionpublic void register(ServiceInstance serviceInstance) throws RuntimeException
register in interface ServiceDiscoveryRuntimeExceptionpublic void update(ServiceInstance serviceInstance) throws RuntimeException
update in interface ServiceDiscoveryRuntimeExceptionpublic void unregister(ServiceInstance serviceInstance) throws RuntimeException
unregister in interface ServiceDiscoveryRuntimeExceptionpublic Set<String> getServices()
getServices in interface ServiceDiscoverypublic List<ServiceInstance> getInstances(String serviceName) throws NullPointerException
getInstances in interface ServiceDiscoveryNullPointerExceptionpublic org.apache.dubbo.common.utils.Page<ServiceInstance> getInstances(String serviceName, int offset, int pageSize, boolean healthyOnly)
getInstances in interface ServiceDiscoverypublic void addServiceInstancesChangedListener(ServiceInstancesChangedListener listener) throws NullPointerException, IllegalArgumentException
addServiceInstancesChangedListener in interface ServiceDiscoveryNullPointerExceptionIllegalArgumentExceptionpublic void onEvent(ServiceInstancesChangedEvent event)
Copyright © 2011–2020 The Apache Software Foundation. All rights reserved.