public class DubboCloudRegistry extends org.apache.dubbo.registry.support.FailbackRegistry implements org.springframework.context.ApplicationListener<ServiceInstancesChangedEvent>
FailbackRegistry is based on Spring Cloud DiscoveryClient.| Modifier and Type | Field and Description |
|---|---|
protected static String |
DUBBO_METADATA_SERVICE_CLASS_NAME |
protected org.slf4j.Logger |
logger |
| Constructor and Description |
|---|
DubboCloudRegistry(org.apache.dubbo.common.URL url,
org.springframework.cloud.client.discovery.DiscoveryClient discoveryClient,
DubboServiceMetadataRepository repository,
DubboMetadataServiceProxy dubboMetadataConfigServiceProxy,
JSONUtils jsonUtils,
org.springframework.context.ConfigurableApplicationContext applicationContext) |
| Modifier and Type | Method and Description |
|---|---|
void |
doRegister(org.apache.dubbo.common.URL url) |
void |
doSubscribe(org.apache.dubbo.common.URL url,
org.apache.dubbo.registry.NotifyListener listener) |
void |
doUnregister(org.apache.dubbo.common.URL url) |
void |
doUnsubscribe(org.apache.dubbo.common.URL url,
org.apache.dubbo.registry.NotifyListener listener) |
protected <T> T |
getBean(Class<T> beanClass) |
List<org.springframework.cloud.client.ServiceInstance> |
getServiceInstances(Map<String,Set<String>> providers) |
Map<String,Map<String,List<org.springframework.cloud.client.ServiceInstance>>> |
getServiceRevisionInstanceMap() |
protected boolean |
isAdminURL(org.apache.dubbo.common.URL url) |
boolean |
isAvailable() |
protected boolean |
isConsumerServiceURL(org.apache.dubbo.common.URL url) |
protected boolean |
isDubboMetadataServiceURL(org.apache.dubbo.common.URL url) |
void |
onApplicationEvent(ServiceInstancesChangedEvent event)
Process ServiceInstanceChangedEvent, refresh dubbo reference and metadata info.
|
protected boolean |
shouldNotRegister(org.apache.dubbo.common.URL url) |
addFailedSubscribed, destroy, doNotify, notify, recover, reExportRegister, reExportUnregister, register, removeFailedNotifiedTask, removeFailedRegisteredTask, removeFailedSubscribedTask, removeFailedUnregisteredTask, removeFailedUnsubscribedTask, subscribe, unregister, unsubscribeprotected static final String DUBBO_METADATA_SERVICE_CLASS_NAME
protected final org.slf4j.Logger logger
public DubboCloudRegistry(org.apache.dubbo.common.URL url,
org.springframework.cloud.client.discovery.DiscoveryClient discoveryClient,
DubboServiceMetadataRepository repository,
DubboMetadataServiceProxy dubboMetadataConfigServiceProxy,
JSONUtils jsonUtils,
org.springframework.context.ConfigurableApplicationContext applicationContext)
protected <T> T getBean(Class<T> beanClass)
protected boolean shouldNotRegister(org.apache.dubbo.common.URL url)
public final void doRegister(org.apache.dubbo.common.URL url)
doRegister in class org.apache.dubbo.registry.support.FailbackRegistrypublic final void doUnregister(org.apache.dubbo.common.URL url)
doUnregister in class org.apache.dubbo.registry.support.FailbackRegistrypublic final void doSubscribe(org.apache.dubbo.common.URL url,
org.apache.dubbo.registry.NotifyListener listener)
doSubscribe in class org.apache.dubbo.registry.support.FailbackRegistrypublic void onApplicationEvent(ServiceInstancesChangedEvent event)
onApplicationEvent in interface org.springframework.context.ApplicationListener<ServiceInstancesChangedEvent>public final void doUnsubscribe(org.apache.dubbo.common.URL url,
org.apache.dubbo.registry.NotifyListener listener)
doUnsubscribe in class org.apache.dubbo.registry.support.FailbackRegistrypublic boolean isAvailable()
isAvailable in interface org.apache.dubbo.common.Nodeprotected boolean isAdminURL(org.apache.dubbo.common.URL url)
protected boolean isDubboMetadataServiceURL(org.apache.dubbo.common.URL url)
protected boolean isConsumerServiceURL(org.apache.dubbo.common.URL url)
public List<org.springframework.cloud.client.ServiceInstance> getServiceInstances(Map<String,Set<String>> providers)
Copyright © 2021 Pivotal Software, Inc.. All rights reserved.