Class DynamicDirectory<T>
java.lang.Object
org.apache.dubbo.rpc.cluster.directory.AbstractDirectory<T>
org.apache.dubbo.registry.integration.DynamicDirectory<T>
- All Implemented Interfaces:
Node,NotifyListener,Directory<T>
- Direct Known Subclasses:
RegistryDirectory,ServiceDiscoveryRegistryDirectory
DynamicDirectory
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddServiceListener(ServiceInstancesChangedListener instanceListener) voidbuildRouterChain(URL url) voiddestroy()voiddoList(SingleRouterChain<T> singleRouterChain, BitList<org.apache.dubbo.rpc.Invoker<T>> invokers, org.apache.dubbo.rpc.Invocation invocation) The currently effective consumer urlThe original consumer urlThe url registered to registry or metadata centerThe url used to subscribe from registrybooleanbooleanbooleanvoidvoidsetProtocol(org.apache.dubbo.rpc.Protocol protocol) voidvoidsetRegistry(Registry registry) voidsetSubscribeUrl(URL subscribeUrl) voidvoidunSubscribe(URL url) Methods 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, toStringMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.dubbo.rpc.cluster.Directory
isEmpty, isServiceDiscoveryMethods inherited from interface org.apache.dubbo.registry.NotifyListener
notify
-
Constructor Details
-
DynamicDirectory
-
-
Method Details
-
addServiceListener
- Specified by:
addServiceListenerin interfaceNotifyListener
-
getServiceListener
- Specified by:
getServiceListenerin interfaceNotifyListener
-
setProtocol
public void setProtocol(org.apache.dubbo.rpc.Protocol protocol) -
setRegistry
-
getRegistry
-
isShouldRegister
public boolean isShouldRegister() -
subscribe
-
unSubscribe
-
doList
-
getInterface
- Specified by:
getInterfacein interfaceDirectory<T>
-
getAllInvokers
- Specified by:
getAllInvokersin interfaceDirectory<T>
-
getConsumerUrl
The currently effective consumer url- Specified by:
getConsumerUrlin interfaceDirectory<T>- Specified by:
getConsumerUrlin interfaceNotifyListener- Overrides:
getConsumerUrlin classAbstractDirectory<T>- Returns:
- URL
-
getOriginalConsumerUrl
The original consumer url- Returns:
- URL
-
getRegisteredConsumerUrl
The url registered to registry or metadata center- Returns:
- URL
-
getSubscribeUrl
The url used to subscribe from registry- Returns:
- URL
-
setSubscribeUrl
-
setRegisteredConsumerUrl
-
buildRouterChain
-
isAvailable
public boolean isAvailable()- Specified by:
isAvailablein interfaceNode
-
destroy
public void destroy()- Specified by:
destroyin interfaceNode- Overrides:
destroyin classAbstractDirectory<T>
-
discordAddresses
public void discordAddresses()- Specified by:
discordAddressesin interfaceDirectory<T>- Overrides:
discordAddressesin classAbstractDirectory<T>
-
setInvokersChangedListener
-
isNotificationReceived
public boolean isNotificationReceived()- Specified by:
isNotificationReceivedin interfaceDirectory<T>
-