Package com.tangosol.coherence.config
Interface EnvironmentVariableResolver
-
- All Known Implementing Classes:
ConfigPropertyResolver
,EnvironmentVariableResolver.Default
public interface EnvironmentVariableResolver
An abstraction that allows us to make environment variable resolution customizable.- Author:
- as 2019.10.11
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
EnvironmentVariableResolver.Default
DefaultEnvironmentVariableResolver
implementation.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description String
getEnv(String sVarName)
Return the value of the specified environment variable.default String
getEnv(String sVarName, String sDefaultValue)
Return the value of the specified environment variable, or the specified default value if the variable doesn't exist.static EnvironmentVariableResolver
getInstance()
Return an instance of aEnvironmentVariableResolver
discovered by theServiceLoader
, or a default instance if none are discovered.
-
-
-
Method Detail
-
getEnv
String getEnv(String sVarName)
Return the value of the specified environment variable.- Parameters:
sVarName
- the name of the environment variable to return- Returns:
- the value of the specified environment variable
-
getEnv
default String getEnv(String sVarName, String sDefaultValue)
Return the value of the specified environment variable, or the specified default value if the variable doesn't exist.- Parameters:
sVarName
- the name of the environment variable to returnsDefaultValue
- the default value to return if the variable doesn't exist- Returns:
- the value of the specified environment variable, or the specified default value if the variable doesn't exist
-
getInstance
static EnvironmentVariableResolver getInstance()
Return an instance of aEnvironmentVariableResolver
discovered by theServiceLoader
, or a default instance if none are discovered.- Returns:
- an instance of a
EnvironmentVariableResolver
-
-