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
Modifier and TypeInterfaceDescriptionstatic class
DefaultEnvironmentVariableResolver
implementation. -
Method Summary
Modifier and TypeMethodDescriptionReturn the value of the specified environment variable.default String
Return the value of the specified environment variable, or the specified default value if the variable doesn't exist.static EnvironmentVariableResolver
Return an instance of aEnvironmentVariableResolver
discovered by theServiceLoader
, or a default instance if none are discovered.
-
Method Details
-
getEnv
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
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
Return an instance of aEnvironmentVariableResolver
discovered by theServiceLoader
, or a default instance if none are discovered.- Returns:
- an instance of a
EnvironmentVariableResolver
-