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 WorkUnitContextcontextShared context amongWorkUnits.SubTaskworkTask to be executed.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Queue.ExecutablegetExecutable()If the execution has already started, return the executable that was created.ExecutorgetExecutor()Executorrunning this work unit.booleanisMainWork()Is this work unit the "main work", which is the primarySubTaskrepresented byQueue.Taskitself.voidsetExecutable(Queue.Executable executable)This method is only meant to be called internally byExecutor.voidsetExecutor(Executor e)StringtoString()
-
-
-
Field Detail
-
work
public final SubTask work
Task to be executed.
-
context
public final WorkUnitContext context
Shared context amongWorkUnits.
-
-
Method Detail
-
getExecutor
@CheckForNull public Executor getExecutor()
Executorrunning 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 primarySubTaskrepresented byQueue.Taskitself.
-
-