Package org.apache.dubbo.rpc.cluster
Interface Configurator
- All Superinterfaces:
Comparable<Configurator>
- All Known Implementing Classes:
AbsentConfigurator,AbstractConfigurator,OverrideConfigurator
Configurator. (SPI, Prototype, ThreadSafe)
-
Method Summary
Modifier and TypeMethodDescriptiondefault intSort 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;org.apache.dubbo.common.URLconfigure(org.apache.dubbo.common.URL url) Configure the provider url.org.apache.dubbo.common.URLgetUrl()Get the configurator url.static Optional<List<Configurator>> toConfigurators(List<org.apache.dubbo.common.URL> urls) Convert override urls to map for use when re-refer.
-
Method Details
-
getUrl
org.apache.dubbo.common.URL getUrl()Get the configurator url.- Returns:
- configurator url.
-
configure
org.apache.dubbo.common.URL configure(org.apache.dubbo.common.URL url) Configure the provider url.- Parameters:
url- - old provider url.- Returns:
- new provider url.
-
toConfigurators
Convert override urls to map for use when re-refer. Send all rules every time, the urls will be reassembled and calculated URL contract:- override://0.0.0.0/...( or override://ip:port...?anyhost=true)invalid input: '¶1'=value1... means global rules (all of the providers take effect)
- override://ip:port...?anyhost=false Special rules (only for a certain provider)
- override:// rule is not supported... ,needs to be calculated by registry itself
- override://0.0.0.0/ without parameters means clearing the override
- Parameters:
urls- URL list to convert- Returns:
- converted configurator list
-
compareTo
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;- Specified by:
compareToin interfaceComparable<Configurator>
-