public abstract class ConfigurationChangeDetector extends Object
Modifier and Type | Field and Description |
---|---|
protected org.springframework.core.env.ConfigurableEnvironment |
environment |
protected org.apache.commons.logging.Log |
log |
protected ConfigReloadProperties |
properties |
protected ConfigurationUpdateStrategy |
strategy |
Constructor and Description |
---|
ConfigurationChangeDetector(org.springframework.core.env.ConfigurableEnvironment environment,
ConfigReloadProperties properties,
ConfigurationUpdateStrategy strategy) |
Modifier and Type | Method and Description |
---|---|
boolean |
changed(List<? extends org.springframework.core.env.MapPropertySource> left,
List<? extends org.springframework.core.env.MapPropertySource> right) |
boolean |
changed(org.springframework.core.env.MapPropertySource left,
org.springframework.core.env.MapPropertySource right)
Determines if two property sources are different.
|
protected <S extends org.springframework.core.env.PropertySource<?>> |
findPropertySource(Class<S> sourceClass)
Finds one registered property source of the given type, logging a warning if
multiple property sources of that type are available.
|
<S extends org.springframework.core.env.PropertySource<?>> |
findPropertySources(Class<S> sourceClass) |
protected List<org.springframework.core.env.MapPropertySource> |
locateMapPropertySources(org.springframework.cloud.bootstrap.config.PropertySourceLocator propertySourceLocator,
org.springframework.core.env.Environment environment)
Returns a list of MapPropertySource that correspond to the current state of the
system.
|
void |
reloadProperties() |
protected org.apache.commons.logging.Log log
protected org.springframework.core.env.ConfigurableEnvironment environment
protected ConfigReloadProperties properties
protected ConfigurationUpdateStrategy strategy
public ConfigurationChangeDetector(org.springframework.core.env.ConfigurableEnvironment environment, ConfigReloadProperties properties, ConfigurationUpdateStrategy strategy)
public void reloadProperties()
public boolean changed(org.springframework.core.env.MapPropertySource left, org.springframework.core.env.MapPropertySource right)
left
- left map property sourcesright
- right map property sourcestrue
if source has changedpublic boolean changed(List<? extends org.springframework.core.env.MapPropertySource> left, List<? extends org.springframework.core.env.MapPropertySource> right)
protected <S extends org.springframework.core.env.PropertySource<?>> S findPropertySource(Class<S> sourceClass)
S
- property source typesourceClass
- class for which property sources will be searched forpublic <S extends org.springframework.core.env.PropertySource<?>> List<S> findPropertySources(Class<S> sourceClass)
S
- property source typesourceClass
- class for which property sources will be foundprotected List<org.springframework.core.env.MapPropertySource> locateMapPropertySources(org.springframework.cloud.bootstrap.config.PropertySourceLocator propertySourceLocator, org.springframework.core.env.Environment environment)
propertySourceLocator
- Spring's property source locatorenvironment
- Spring environmentCopyright © 2017–2022 Pivotal Software, Inc.. All rights reserved.