类 RegistryDirectory<T>

    • 构造器详细资料

      • RegistryDirectory

        public RegistryDirectory​(<T> serviceType,
                                 URL url)
    • 方法详细资料

      • toConfigurators

        public static <<URL> urls)
        Convert override urls to map for use when re-refer. Send all rules every time, the urls will be reassembled and calculated
        参数:
        urls - Contract:
        1.override://0.0.0.0/...( or override://ip:port...?anyhost=true)¶1=value1... means global rules (all of the providers take effect)
        2.override://ip:port...?anyhost=false Special rules (only for a certain provider)
        3.override:// rule is not supported... ,needs to be calculated by registry itself.
        4.override://0.0.0.0/ without parameters means clearing the override
        返回:
      • setProtocol

        public void setProtocol​(Protocol protocol)
      • setRegistry

        public void setRegistry​(Registry registry)
      • subscribe

        public void subscribe​(URL url)
      • notify

        public void notify​(<URL> urls)
        从接口复制的说明: NotifyListener
        Triggered 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.

        指定者:
        notify 在接口中 NotifyListener
        参数:
        urls - The list of registered information , is always not empty. The meaning is the same as the return value of RegistryService.lookup(URL).
      • getInterface

        public <T> getInterface()
        从接口复制的说明: Directory
        get service type.
        指定者:
        getInterface 在接口中 Directory<T>
        返回:
        service type.
      • getRegisteredConsumerUrl

        public URL getRegisteredConsumerUrl()
      • setRegisteredConsumerUrl

        public void setRegisteredConsumerUrl​(URL registeredConsumerUrl)
      • isAvailable

        public boolean isAvailable()
        从接口复制的说明: Node
        is available.
        指定者:
        isAvailable 在接口中 Node
        返回:
        available.
      • getUrlInvokerMap

        public <,​Invoker<T>> getUrlInvokerMap()
        Haomin: added for test purpose
      • getMethodInvokerMap

        public <,​<Invoker<T>>> getMethodInvokerMap()
        Haomin: added for test purpose