Package io.debezium.embedded
Interface AvailableVariables
-
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface AvailableVariables
A functional interface for obtaining the value of variables given their names.- Author:
- Randall Hauch
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default AvailableVariablesand(AvailableVariables next)Obtain anAvailableVariablesfunction that first checks this instance and then checks the supplied instance.static AvailableVariablesconfigVariables(Configuration config)Get anAvailableVariablesthat returns the value of aConfiguration property.static AvailableVariablesempty()Get anAvailableVariablesthat always returns null.static AvailableVariablesenvironmentVariables(Configuration config)Get anAvailableVariablesthat returnsSystem environment variablesset with operating system environment variables (e.g.,${JAVA_HOME}).static AvailableVariablessystemVariables(Configuration config)StringvariableForName(String varName)Obtain the value of a variable with the given name.
-
-
-
Method Detail
-
configVariables
static AvailableVariables configVariables(Configuration config)
Get anAvailableVariablesthat returns the value of aConfiguration property.- Parameters:
config- the configuration- Returns:
- the available variables function that returns the configuration property value for the given property name; never null
-
systemVariables
static AvailableVariables systemVariables(Configuration config)
Get anAvailableVariablesthat returnsSystem propertiesset with-Dvariable=value.This method does not use the configuration.
- Parameters:
config- the configuration- Returns:
- the available variables function that returns System properties; never null
-
environmentVariables
static AvailableVariables environmentVariables(Configuration config)
Get anAvailableVariablesthat returnsSystem environment variablesset with operating system environment variables (e.g.,${JAVA_HOME}).This method does not use the configuration.
- Parameters:
config- the configuration- Returns:
- the available variables function that returns System properties; never null
-
empty
static AvailableVariables empty()
Get anAvailableVariablesthat always returns null.- Returns:
- the empty available variables function that always return null.
-
variableForName
String variableForName(String varName)
Obtain the value of a variable with the given name.- Parameters:
varName- the variable name; may be null- Returns:
- the value of the variable; may be null if the named variable is not known
-
and
default AvailableVariables and(AvailableVariables next)
Obtain anAvailableVariablesfunction that first checks this instance and then checks the supplied instance.- Parameters:
next- the nextAvailableVariablesinstance to check- Returns:
- the new
AvailableVariablesfunction that combines both instances; never null but may be this instance ifnextis null or
-
-