Package io.debezium.relational
Class SystemVariables
java.lang.Object
io.debezium.relational.SystemVariables
Encapsulates a set of a database's system variables.
- Author:
- Randall Hauch
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
static interface
Interface that is used for enums defining the customized scope values for specific DBMSs. -
Field Summary
Modifier and TypeFieldDescriptionprivate final Map<SystemVariables.Scope,
ConcurrentMap<String, String>> -
Constructor Summary
ConstructorDescriptionCreate an instance.SystemVariables
(SystemVariables.Scope[] scopes) SystemVariables
(List<SystemVariables.Scope> scopes) -
Method Summary
Modifier and TypeMethodDescriptionprotected ConcurrentMap<String,
String> forScope
(SystemVariables.Scope scope) private List<ConcurrentMap<String,
String>> getVariable
(String name) Get the variable with the specified name, from the highest priority scope that contain it.getVariable
(String name, SystemVariables.Scope scope) Get the variable with the specified name and scope.setVariable
(SystemVariables.Scope scope, String name, String value) Set the variable with the specified scope.private String
variableName
(String name)
-
Field Details
-
systemVariables
-
-
Constructor Details
-
SystemVariables
public SystemVariables()Create an instance. -
SystemVariables
-
SystemVariables
-
-
Method Details
-
setVariable
Set the variable with the specified scope.- Parameters:
scope
- the variable scope; may be null if the session scope is to be usedname
- the name of the variable; may not be nullvalue
- the variable value; may be null if the value for the named variable is to be removed- Returns:
- this object for method chaining purposes; never null
-
getVariable
Get the variable with the specified name and scope.- Parameters:
name
- the name of the variable; may not be nullscope
- the variable scope; may not be null- Returns:
- the variable value; may be null if the variable is not currently set
-
getVariable
Get the variable with the specified name, from the highest priority scope that contain it.- Parameters:
name
- the name of the variable; may not be null- Returns:
- the variable value; may be null if the variable is not currently set
-
getOrderedSystemVariablesByScopePriority
-
variableName
-
forScope
-