Class EnvBasedCconfigRetriever
java.lang.Object
org.chenile.cconfig.sdk.impl.EnvBasedCconfigRetriever
- All Implemented Interfaces:
CconfigRetriever
This considers all the module keys and selectively enhances them if there is an environmental override.
Note that environment will not add any new config keys. It will only enhance the existing keys.
Also, this completely replaces the existing value for the key with a new value rather than selective
manipulation of the value of the key.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionEnvBasedCconfigRetriever(Environment environment, CconfigRetrieverFactory cconfigRetrieverFactory) -
Method Summary
Modifier and TypeMethodDescriptionvoidaugmentKeys(ConfigContext configContext) private Stringintorder()Give it a higher precedence since Environment should ultimately override everything.void
-
Field Details
-
environment
-
cconfigRetrieverFactory
-
-
Constructor Details
-
EnvBasedCconfigRetriever
public EnvBasedCconfigRetriever(Environment environment, CconfigRetrieverFactory cconfigRetrieverFactory)
-
-
Method Details
-
registerWithFactory
-
augmentKeys
- Specified by:
augmentKeysin interfaceCconfigRetriever
-
order
public int order()Give it a higher precedence since Environment should ultimately override everything. But we will keep it relatively lower than database since- Specified by:
orderin interfaceCconfigRetriever- Returns:
-
envKey
-