Class ParallelNodeDispatcher
- java.lang.Object
-
- com.dtolabs.rundeck.core.execution.dispatch.ParallelNodeDispatcher
-
- All Implemented Interfaces:
NodeDispatcher
public class ParallelNodeDispatcher extends java.lang.Object implements NodeDispatcher
MultiNodeExecutor is ...
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classParallelNodeDispatcher.SetThreadLocalTaskTask to set a threadlocal value given a refid.
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringNODE_NAME_LOCAL_REF_IDstatic java.lang.StringNODE_USER_LOCAL_REF_IDstatic java.lang.StringSTATUS_LISTENER_REF_ID
-
Constructor Summary
Constructors Constructor Description ParallelNodeDispatcher(IFramework framework)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static voidaddNodeContextTasks(INodeEntry nodeentry, org.apache.tools.ant.Project project, org.apache.tools.ant.taskdefs.Sequential seq)Add tasks to the Sequential to set threadlocal values for the node name and usernamestatic voidconfigureNodeContextThreadLocalsForProject(org.apache.tools.ant.Project project)Adds InheritableNodeLocal references to the Project for use by the node context tasksDispatcherResultdispatch(StepExecutionContext context, Dispatchable item)DispatcherResultdispatch(StepExecutionContext context, NodeStepExecutionItem item)DispatcherResultdispatch(StepExecutionContext context, NodeStepExecutionItem item, Dispatchable toDispatch)static java.lang.StringgetThreadLocalForProject(java.lang.String nodeNameLocalRefId, org.apache.tools.ant.Project project)Extract the threadlocal stored as a reference in the project, and return the string value or null.
-
-
-
Constructor Detail
-
ParallelNodeDispatcher
public ParallelNodeDispatcher(IFramework framework)
-
-
Method Detail
-
dispatch
public DispatcherResult dispatch(StepExecutionContext context, NodeStepExecutionItem item) throws DispatcherException
- Specified by:
dispatchin interfaceNodeDispatcher- Parameters:
context- contextitem- step item- Returns:
- result
- Throws:
DispatcherException- on error
-
dispatch
public DispatcherResult dispatch(StepExecutionContext context, Dispatchable item) throws DispatcherException
- Specified by:
dispatchin interfaceNodeDispatcher- Throws:
DispatcherException
-
dispatch
public DispatcherResult dispatch(StepExecutionContext context, NodeStepExecutionItem item, Dispatchable toDispatch) throws DispatcherException
- Throws:
DispatcherException
-
configureNodeContextThreadLocalsForProject
public static void configureNodeContextThreadLocalsForProject(org.apache.tools.ant.Project project)
Adds InheritableNodeLocal references to the Project for use by the node context tasks- Parameters:
project- the project
-
getThreadLocalForProject
public static java.lang.String getThreadLocalForProject(java.lang.String nodeNameLocalRefId, org.apache.tools.ant.Project project)Extract the threadlocal stored as a reference in the project, and return the string value or null.- Parameters:
nodeNameLocalRefId- refid for the thread local variableproject- Project- Returns:
- value of the variable, or null if it is not found or the refid doesn't refer to a valid thread local
-
addNodeContextTasks
public static void addNodeContextTasks(INodeEntry nodeentry, org.apache.tools.ant.Project project, org.apache.tools.ant.taskdefs.Sequential seq)
Add tasks to the Sequential to set threadlocal values for the node name and username- Parameters:
nodeentry- node entryproject- ant Projectseq- Sequential
-
-