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)

Directory Service

See Also:
  • invalid reference
    org.apache.dubbo.rpc.cluster.Cluster#join(Directory)
  • Method Details

    • getInterface

      Class<T> getInterface()
      get service type.
      Returns:
      service type.
    • list

      List<Invoker<T>> list(Invocation invocation) throws RpcException
      list invokers. filtered by invocation
      Returns:
      invokers
      Throws:
      RpcException
    • getAllInvokers

      List<Invoker<T>> 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

      void addInvalidateInvoker(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 notification
      Parameters:
      invoker - invoker to invalidate
    • addDisabledInvoker

      void addDisabledInvoker(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 notification
      Parameters:
      invoker - invoker to invalidate
    • recoverDisabledInvoker

      void recoverDisabledInvoker(Invoker<T> invoker)
      recover a disabled invoker
      Parameters:
      invoker - invoker to invalidate
    • isNotificationReceived

      default boolean isNotificationReceived()