public class VarReplacementProvider
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private static VarReplacementProvider |
instance
The Constant instance.
|
private static org.slf4j.Logger |
logger
The logger.
|
Modifier | Constructor and Description |
---|---|
private |
VarReplacementProvider()
Instantiates a new var replacement provider.
|
Modifier and Type | Method and Description |
---|---|
static VarReplacementProvider |
getInstance()
Gets the single instance of VarReplacementProvider.
|
void |
updateRequestByAddingReplaceVarPair(ParallelTask task,
java.lang.String replaceVarKey,
java.lang.String replaceVarValue)
GENERIC!!! HELPER FUNCION FOR REPLACEMENT
update the var: DYNAMIC REPLACEMENT of VAR.
|
void |
updateRequestByAddingReplaceVarPairNodeSpecific(ParallelTask task,
java.util.Map<java.lang.String,StrStrMap> replacementVarMapNodeSpecific)
Will change replacementVarMapNodeSpecific according to each node
specifically
With KEY set as NA; will not run the command ONLY if the NA is
the last replacement; note in this logic; when it is not NA; will set AS
True.
|
void |
updateRequestWithReplacement(ParallelTask task,
boolean useReplacementVarMap,
java.util.Map<java.lang.String,java.lang.String> replacementVarMap,
boolean useReplacementVarMapNodeSpecific,
java.util.Map<java.lang.String,StrStrMap> replacementVarMapNodeSpecific)
20130916: add node specific replacement Var Map; replacementVarMap VS.
|
private static org.slf4j.Logger logger
private static final VarReplacementProvider instance
private VarReplacementProvider()
public static VarReplacementProvider getInstance()
public void updateRequestWithReplacement(ParallelTask task, boolean useReplacementVarMap, java.util.Map<java.lang.String,java.lang.String> replacementVarMap, boolean useReplacementVarMapNodeSpecific, java.util.Map<java.lang.String,StrStrMap> replacementVarMapNodeSpecific)
task
- the parallel taskuseReplacementVarMap
- boolean: use uniform replacement mapreplacementVarMap
- the replacement variable mapuseReplacementVarMapNodeSpecific
- boolean: use target host specific replacement mapreplacementVarMapNodeSpecific
- the replacement variable map node specificpublic void updateRequestByAddingReplaceVarPair(ParallelTask task, java.lang.String replaceVarKey, java.lang.String replaceVarValue)
task
- the taskreplaceVarKey
- the replace var keyreplaceVarValue
- the replace var valuepublic void updateRequestByAddingReplaceVarPairNodeSpecific(ParallelTask task, java.util.Map<java.lang.String,StrStrMap> replacementVarMapNodeSpecific)
task
- the taskreplacementVarMapNodeSpecific
- the replacement var map node specific