类 Environment
- java.lang.Object
-
- org.apache.dubbo.common.context.LifecycleAdapter
-
- org.apache.dubbo.common.config.Environment
-
- 所有已实现的接口:
FrameworkExt,Lifecycle
public class Environment extends LifecycleAdapter implements FrameworkExt
-
-
构造器概要
构造器 构造器 说明 Environment()
-
方法概要
-
从类继承的方法 org.apache.dubbo.common.context.LifecycleAdapter
start
-
-
-
-
方法详细资料
-
initialize
public void initialize() throws IllegalStateException从接口复制的说明:LifecycleInitialize the component beforestart- 指定者:
initialize在接口中Lifecycle- 覆盖:
initialize在类中LifecycleAdapter- 抛出:
IllegalStateException
-
setExternalConfigMap
@DisableInject public void setExternalConfigMap(Map<String,String> externalConfiguration)
-
setAppExternalConfigMap
@DisableInject public void setAppExternalConfigMap(Map<String,String> appExternalConfiguration)
-
updateExternalConfigurationMap
public void updateExternalConfigurationMap(Map<String,String> externalMap)
-
updateAppExternalConfigurationMap
public void updateAppExternalConfigurationMap(Map<String,String> externalMap)
-
getPrefixedConfiguration
public CompositeConfiguration getPrefixedConfiguration(AbstractConfig config)
At start-up, Dubbo is driven by various configuration, such as Application, Registry, Protocol, etc. All configurations will be converged into a data bus - URL, and then drive the subsequent process.At present, there are many configuration sources, including AbstractConfig (API, XML, annotation), - D, config center, etc. This method helps us to filter out the most priority values from various configuration sources.
- 参数:
config-- 返回:
-
getConfiguration
public Configuration getConfiguration()
There are two ways to get configuration during exposure / reference or at runtime: 1. URL, The value in the URL is relatively fixed. we can get value directly. 2. The configuration exposed in this method is convenient for us to query the latest values from multiple prioritized sources, it also guarantees that configs changed dynamically can take effect on the fly.
-
getDynamicGlobalConfiguration
public Configuration getDynamicGlobalConfiguration()
-
isConfigCenterFirst
public boolean isConfigCenterFirst()
-
setConfigCenterFirst
@DisableInject public void setConfigCenterFirst(boolean configCenterFirst)
-
getDynamicConfiguration
public Optional<DynamicConfiguration> getDynamicConfiguration()
-
setDynamicConfiguration
@DisableInject public void setDynamicConfiguration(DynamicConfiguration dynamicConfiguration)
-
destroy
public void destroy() throws IllegalStateException从接口复制的说明:LifecycleDestroy the component- 指定者:
destroy在接口中Lifecycle- 覆盖:
destroy在类中LifecycleAdapter- 抛出:
IllegalStateException
-
getPropertiesConfiguration
public PropertiesConfiguration getPropertiesConfiguration()
-
getSystemConfiguration
public SystemConfiguration getSystemConfiguration()
-
getEnvironmentConfiguration
public EnvironmentConfiguration getEnvironmentConfiguration()
-
getExternalConfiguration
public InmemoryConfiguration getExternalConfiguration()
-
getAppExternalConfiguration
public InmemoryConfiguration getAppExternalConfiguration()
-
clearExternalConfigs
public void clearExternalConfigs()
-
clearAppExternalConfigs
public void clearAppExternalConfigs()
-
-