类 AbstractDirectory<T>
- java.lang.Object
-
- org.apache.dubbo.rpc.cluster.directory.AbstractDirectory<T>
-
- 所有已实现的接口:
org.apache.dubbo.common.Node,Directory<T>
- 直接已知子类:
StaticDirectory
public abstract class AbstractDirectory<T> extends Object implements Directory<T>
Abstract implementation of Directory: Invoker list returned from this Directory's list method have been filtered by Routers
-
-
构造器概要
构造器 构造器 说明 AbstractDirectory(org.apache.dubbo.common.URL url)AbstractDirectory(org.apache.dubbo.common.URL url, boolean isUrlFromRegistry)AbstractDirectory(org.apache.dubbo.common.URL url, RouterChain<T> routerChain, boolean isUrlFromRegistry)
-
方法概要
所有方法 实例方法 具体方法 已过时的方法 修饰符和类型 方法 说明 voidaddDisabledInvoker(Invoker<T> invoker)disable an invoker, remove from list next time will be removed when invoker is removed by address refresh notification using in service offline notificationvoidaddInvalidateInvoker(Invoker<T> invoker)invalidate an invoker, add it into reconnect task, remove from list next time will be recovered by address refresh notification or reconnect success notificationvoidcheckConnectivity()voiddestroy()voiddiscordAddresses()SemaphoregetCheckConnectivityPermit()已过时。ScheduledFuture<?>getConnectivityCheckFuture()已过时。org.apache.dubbo.common.URLgetConsumerUrl()Set<Invoker<T>>getDisabledInvokers()BitList<Invoker<T>>getInvokers()List<Invoker<T>>getInvokersToReconnect()RouterChain<T>getRouterChain()org.apache.dubbo.common.URLgetUrl()BitList<Invoker<T>>getValidInvokers()booleanisDestroyed()List<Invoker<T>>list(Invocation invocation)list invokers.voidrecoverDisabledInvoker(Invoker<T> invoker)recover a disabled invokervoidrefreshInvoker()Refresh invokers from total invokers 1. all the invokers in need to reconnect list should be removed in the valid invokers list 2. all the invokers in disabled invokers list should be removed in the valid invokers list 3. all the invokers disappeared from total invokers should be removed in the need to reconnect list 4. all the invokers disappeared from total invokers should be removed in the disabled invokers listvoidsetConsumerUrl(org.apache.dubbo.common.URL consumerUrl)voidsetRouterChain(RouterChain<T> routerChain)-
从接口继承的方法 org.apache.dubbo.rpc.cluster.Directory
getAllInvokers, getInterface, isEmpty, isNotificationReceived, isServiceDiscovery
-
-
-
-
构造器详细资料
-
AbstractDirectory
public AbstractDirectory(org.apache.dubbo.common.URL url)
-
AbstractDirectory
public AbstractDirectory(org.apache.dubbo.common.URL url, boolean isUrlFromRegistry)
-
AbstractDirectory
public AbstractDirectory(org.apache.dubbo.common.URL url, RouterChain<T> routerChain, boolean isUrlFromRegistry)
-
-
方法详细资料
-
list
public List<Invoker<T>> list(Invocation invocation) throws RpcException
从接口复制的说明:Directorylist invokers. filtered by invocation- 指定者:
list在接口中Directory<T>- 返回:
- invokers
- 抛出:
RpcException
-
getUrl
public org.apache.dubbo.common.URL getUrl()
- 指定者:
getUrl在接口中org.apache.dubbo.common.Node
-
getRouterChain
public RouterChain<T> getRouterChain()
- 指定者:
getRouterChain在接口中Directory<T>
-
setRouterChain
public void setRouterChain(RouterChain<T> routerChain)
-
getConsumerUrl
public org.apache.dubbo.common.URL getConsumerUrl()
- 指定者:
getConsumerUrl在接口中Directory<T>
-
setConsumerUrl
public void setConsumerUrl(org.apache.dubbo.common.URL consumerUrl)
-
isDestroyed
public boolean isDestroyed()
- 指定者:
isDestroyed在接口中Directory<T>
-
destroy
public void destroy()
- 指定者:
destroy在接口中org.apache.dubbo.common.Node
-
discordAddresses
public void discordAddresses()
- 指定者:
discordAddresses在接口中Directory<T>
-
addInvalidateInvoker
public void addInvalidateInvoker(Invoker<T> invoker)
从接口复制的说明:Directoryinvalidate an invoker, add it into reconnect task, remove from list next time will be recovered by address refresh notification or reconnect success notification- 指定者:
addInvalidateInvoker在接口中Directory<T>- 参数:
invoker- invoker to invalidate
-
checkConnectivity
public void checkConnectivity()
-
refreshInvoker
public void refreshInvoker()
Refresh invokers from total invokers 1. all the invokers in need to reconnect list should be removed in the valid invokers list 2. all the invokers in disabled invokers list should be removed in the valid invokers list 3. all the invokers disappeared from total invokers should be removed in the need to reconnect list 4. all the invokers disappeared from total invokers should be removed in the disabled invokers list
-
addDisabledInvoker
public void addDisabledInvoker(Invoker<T> invoker)
从接口复制的说明:Directorydisable an invoker, remove from list next time will be removed when invoker is removed by address refresh notification using in service offline notification- 指定者:
addDisabledInvoker在接口中Directory<T>- 参数:
invoker- invoker to invalidate
-
recoverDisabledInvoker
public void recoverDisabledInvoker(Invoker<T> invoker)
从接口复制的说明:Directoryrecover a disabled invoker- 指定者:
recoverDisabledInvoker在接口中Directory<T>- 参数:
invoker- invoker to invalidate
-
getCheckConnectivityPermit
@Deprecated public Semaphore getCheckConnectivityPermit()
已过时。for ut only
-
getConnectivityCheckFuture
@Deprecated public ScheduledFuture<?> getConnectivityCheckFuture()
已过时。for ut only
-
-