接口 Configurator

    • 方法详细资料

      • getUrl

        URL getUrl()
        Get the configurator url.
        返回:
        configurator url.
      • configure

        URL configure​(URL url)
        Configure the provider url.
        参数:
        url - - old provider url.
        返回:
        new provider url.
      • toConfigurators

        static Optional<List<Configurator>> toConfigurators​(List<URL> urls)
        Convert override urls to map for use when re-refer. Send all rules every time, the urls will be reassembled and calculated URL 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
        参数:
        urls - URL list to convert
        返回:
        converted configurator list
      • compareTo

        default int compareTo​(Configurator o)
        Sort by host, then by priority 1. the url with a specific host ip should have higher priority than 0.0.0.0 2. if two url has the same host, compare by priority value;
        指定者:
        compareTo 在接口中 Comparable<Configurator>