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 class
ParallelNodeDispatcher.SetThreadLocalTask
Task to set a threadlocal value given a refid.
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
NODE_NAME_LOCAL_REF_ID
static java.lang.String
NODE_USER_LOCAL_REF_ID
static java.lang.String
STATUS_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 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 usernamestatic void
configureNodeContextThreadLocalsForProject(org.apache.tools.ant.Project project)
Adds InheritableNodeLocal references to the Project for use by the node context tasksDispatcherResult
dispatch(StepExecutionContext context, Dispatchable item)
DispatcherResult
dispatch(StepExecutionContext context, NodeStepExecutionItem item)
DispatcherResult
dispatch(StepExecutionContext context, NodeStepExecutionItem item, Dispatchable toDispatch)
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.
-
-
-
Constructor Detail
-
ParallelNodeDispatcher
public ParallelNodeDispatcher(IFramework framework)
-
-
Method Detail
-
dispatch
public DispatcherResult dispatch(StepExecutionContext context, NodeStepExecutionItem item) throws DispatcherException
- Specified by:
dispatch
in interfaceNodeDispatcher
- Parameters:
context
- contextitem
- step item- Returns:
- result
- Throws:
DispatcherException
- on error
-
dispatch
public DispatcherResult dispatch(StepExecutionContext context, Dispatchable item) throws DispatcherException
- Specified by:
dispatch
in 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
-
-