Package hudson.model.queue
Class WorkUnit
- java.lang.Object
-
- hudson.model.queue.WorkUnit
-
public final class WorkUnit extends Object
- Since:
- 1.377
- Author:
- Kohsuke Kawaguchi
-
-
Field Summary
Fields Modifier and Type Field Description WorkUnitContext
context
Shared context amongWorkUnit
s.SubTask
work
Task to be executed.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Queue.Executable
getExecutable()
If the execution has already started, return the executable that was created.Executor
getExecutor()
Executor
running this work unit.boolean
isMainWork()
Is this work unit the "main work", which is the primarySubTask
represented byQueue.Task
itself.void
setExecutable(Queue.Executable executable)
This method is only meant to be called internally byExecutor
.void
setExecutor(Executor e)
String
toString()
-
-
-
Field Detail
-
work
public final SubTask work
Task to be executed.
-
context
public final WorkUnitContext context
Shared context amongWorkUnit
s.
-
-
Method Detail
-
getExecutor
@CheckForNull public Executor getExecutor()
Executor
running this work unit.Executor.getCurrentWorkUnit()
andgetExecutor()
form a bi-directional reachability between them.
-
setExecutor
public void setExecutor(@CheckForNull Executor e)
-
getExecutable
@CheckForNull public Queue.Executable getExecutable()
If the execution has already started, return the executable that was created.
-
setExecutable
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public void setExecutable(Queue.Executable executable)
This method is only meant to be called internally byExecutor
.
-
isMainWork
public boolean isMainWork()
Is this work unit the "main work", which is the primarySubTask
represented byQueue.Task
itself.
-
-