public class ConfigurationUtils extends Object
| Constructor and Description |
|---|
ConfigurationUtils() |
public static Configuration getSystemConfiguration(ScopeModel scopeModel)
public static Configuration getEnvConfiguration(ScopeModel scopeModel)
public static Configuration getGlobalConfiguration(ScopeModel scopeModel)
Also see Environment.getConfiguration()
public static Configuration getDynamicGlobalConfiguration(ScopeModel scopeModel)
public static int getServerShutdownTimeout(ScopeModel scopeModel)
public static String getCachedDynamicProperty(ScopeModel realScopeModel, String key, String defaultValue)
public static String getDynamicProperty(ScopeModel scopeModel, String property)
public static String getDynamicProperty(ScopeModel scopeModel, String property, String defaultValue)
public static String getProperty(ScopeModel scopeModel, String property)
public static String getProperty(ScopeModel scopeModel, String property, String defaultValue)
public static int get(ScopeModel scopeModel, String property, int defaultValue)
public static Map<String,String> parseProperties(String content) throws IOException
IOExceptionpublic static boolean isEmptyValue(Object value)
public static <V> Map<String,V> getSubProperties(Collection<Map<String,V>> configMaps, String prefix)
# properties
dubbo.protocol.name=dubbo
dubbo.protocol.port=1234
# extract protocol props
Map props = getSubProperties("dubbo.protocol.");
# result
props: {"name": "dubbo", "port" : "1234"}
V - configMaps - prefix - public static <V> Map<String,V> getSubProperties(Map<String,V> configMap, String prefix)
public static <V> boolean hasSubProperties(Collection<Map<String,V>> configMaps, String prefix)
public static <V> Set<String> getSubIds(Collection<Map<String,V>> configMaps, String prefix)
# properties
dubbo.registries.registry1.address=xxx
dubbo.registries.registry2.port=xxx
# extract ids
Set configIds = getSubIds("dubbo.registries.")
# result
configIds: ["registry1", "registry2"]
configMaps - prefix - public static DynamicConfigurationFactory getDynamicConfigurationFactory(ExtensionAccessor extensionAccessor, String name)
DynamicConfigurationFactory by the specified name. If not found, take the default
extension of DynamicConfigurationFactoryname - the name of extension of DynamicConfigurationFactory2.7.4@Deprecated public static Configuration getSystemConfiguration()
getSystemConfiguration(ScopeModel)@Deprecated public static Configuration getEnvConfiguration()
getEnvConfiguration(ScopeModel)@Deprecated public static Configuration getGlobalConfiguration()
getGlobalConfiguration(ScopeModel)@Deprecated public static Configuration getDynamicGlobalConfiguration()
getDynamicGlobalConfiguration(ScopeModel)@Deprecated public static String getCachedDynamicProperty(String key, String defaultValue)
getCachedDynamicProperty(ScopeModel, String, String)@Deprecated public static String getDynamicProperty(String property)
getDynamicProperty(ScopeModel, String)@Deprecated public static String getDynamicProperty(String property, String defaultValue)
getDynamicProperty(ScopeModel, String, String)@Deprecated public static String getProperty(String property)
getProperty(ScopeModel, String)@Deprecated public static String getProperty(String property, String defaultValue)
getProperty(ScopeModel, String, String)@Deprecated public static int get(String property, int defaultValue)
get(ScopeModel, String, int)Copyright © 2011–2022 The Apache Software Foundation. All rights reserved.