public class LocalFileConfigRepository extends AbstractConfigRepository implements RepositoryChangeListener
| Constructor and Description |
|---|
LocalFileConfigRepository(String namespace)
Constructor.
|
LocalFileConfigRepository(String namespace,
ConfigRepository upstream) |
| Modifier and Type | Method and Description |
|---|---|
Properties |
getConfig()
Get the config from this repository.
|
ConfigSourceType |
getSourceType()
Return the config's source type, i.e.
|
void |
onRepositoryChange(String namespace,
Properties newProperties)
Invoked when config repository changes.
|
void |
setUpstreamRepository(ConfigRepository upstreamConfigRepository)
Set the fallback repo for this repository.
|
addChangeListener, removeChangeListenerpublic LocalFileConfigRepository(String namespace)
namespace - the namespacepublic LocalFileConfigRepository(String namespace, ConfigRepository upstream)
public Properties getConfig()
ConfigRepositorygetConfig in interface ConfigRepositorypublic void setUpstreamRepository(ConfigRepository upstreamConfigRepository)
ConfigRepositorysetUpstreamRepository in interface ConfigRepositoryupstreamConfigRepository - the upstream repopublic ConfigSourceType getSourceType()
ConfigRepositorygetSourceType in interface ConfigRepositorypublic void onRepositoryChange(String namespace, Properties newProperties)
RepositoryChangeListeneronRepositoryChange in interface RepositoryChangeListenernamespace - the namespace of this repository changenewProperties - the properties after changeCopyright © 2022 Ctrip, Inc.. All rights reserved.