Class ServiceDiscoveryRegistryDirectory<T>
- All Implemented Interfaces:
Node,NotifyListener,Directory<T>
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classstatic final class -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbuildRouterChain(URL url) voiddestroy()booleanThis implementation makes sure all application names related to serviceListener received address notification.booleanvoidTriggered when a service change notification is received.voidtoString()voidunSubscribe(URL url) Methods inherited from class org.apache.dubbo.registry.integration.DynamicDirectory
addServiceListener, discordAddresses, doList, getAllInvokers, getConsumerUrl, getInterface, getOriginalConsumerUrl, getRegisteredConsumerUrl, getRegistry, getServiceListener, getSubscribeUrl, isAvailable, isShouldRegister, setInvokersChangedListener, setProtocol, setRegisteredConsumerUrl, setRegistry, setSubscribeUrlMethods inherited from class org.apache.dubbo.rpc.cluster.directory.AbstractDirectory
addDisabledInvoker, addInvalidateInvoker, checkConnectivity, getCheckConnectivityPermit, getConnectivityCheckFuture, getDisabledInvokers, getInvokers, getInvokersToReconnect, getRouterChain, getUrl, getValidInvokers, isDestroyed, list, recoverDisabledInvoker, refreshInvoker, setConsumerUrl, setRouterChain
-
Constructor Details
-
ServiceDiscoveryRegistryDirectory
-
-
Method Details
-
subscribe
- Overrides:
subscribein classDynamicDirectory<T>
-
unSubscribe
- Overrides:
unSubscribein classDynamicDirectory<T>
-
destroy
public void destroy()- Specified by:
destroyin interfaceNode- Overrides:
destroyin classDynamicDirectory<T>
-
buildRouterChain
- Overrides:
buildRouterChainin classDynamicDirectory<T>
-
notify
Description copied from interface:NotifyListenerTriggered when a service change notification is received.Notify needs to support the contract:
1. Always notifications on the service interface and the dimension of the data type. that is, won't notify part of the same type data belonging to one service. Users do not need to compare the results of the previous notification.
2. The first notification at a subscription must be a full notification of all types of data of a service.
3. At the time of change, different types of data are allowed to be notified separately, e.g.: providers, consumers, routers, overrides. It allows only one of these types to be notified, but the data of this type must be full, not incremental.
4. If a data type is empty, need to notify a empty protocol with category parameter identification of url data.
5. The order of notifications to be guaranteed by the notifications(That is, the implementation of the registry). Such as: single thread push, queue serialization, and version comparison.- Parameters:
instanceUrls- The list of registered information , is always not empty. The meaning is the same as the return value ofRegistryService.lookup(URL).
-
isServiceDiscovery
public boolean isServiceDiscovery() -
isNotificationReceived
public boolean isNotificationReceived()This implementation makes sure all application names related to serviceListener received address notification.FIXME, make sure deprecated "interface-application" mapping item be cleared in time.
- Specified by:
isNotificationReceivedin interfaceDirectory<T>- Overrides:
isNotificationReceivedin classDynamicDirectory<T>
-
toString
- Overrides:
toStringin classAbstractDirectory<T>
-