Package org.apache.dubbo.rpc.cluster
Interface Directory<T>
- All Superinterfaces:
org.apache.dubbo.common.Node
- All Known Implementing Classes:
AbstractDirectory,StaticDirectory
public interface Directory<T>
extends org.apache.dubbo.common.Node
Directory. (SPI, Prototype, ThreadSafe)
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddDisabledInvoker(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 notificationvoidlist invokers include all invokers from registryorg.apache.dubbo.common.URLget service type.booleandefault booleanisEmpty()default booleandefault booleanlist(Invocation invocation) list invokers.voidrecoverDisabledInvoker(Invoker<T> invoker) recover a disabled invokerMethods inherited from interface org.apache.dubbo.common.Node
destroy, getUrl, isAvailable
-
Method Details
-
getInterface
get service type.- Returns:
- service type.
-
list
list invokers. filtered by invocation- Returns:
- invokers
- Throws:
RpcException
-
getAllInvokers
list invokers include all invokers from registry -
getConsumerUrl
org.apache.dubbo.common.URL getConsumerUrl() -
isDestroyed
boolean isDestroyed() -
isEmpty
default boolean isEmpty() -
isServiceDiscovery
default boolean isServiceDiscovery() -
discordAddresses
void discordAddresses() -
getRouterChain
RouterChain<T> getRouterChain() -
addInvalidateInvoker
invalidate an invoker, add it into reconnect task, remove from list next time will be recovered by address refresh notification or reconnect success notification- Parameters:
invoker- invoker to invalidate
-
addDisabledInvoker
disable an invoker, remove from list next time will be removed when invoker is removed by address refresh notification using in service offline notification- Parameters:
invoker- invoker to invalidate
-
recoverDisabledInvoker
recover a disabled invoker- Parameters:
invoker- invoker to invalidate
-
isNotificationReceived
default boolean isNotificationReceived()
-