public final class WorkUnit extends Object
Modifier and Type | Field and Description |
---|---|
WorkUnitContext |
context
Shared context among
WorkUnit s. |
SubTask |
work
Task to be executed.
|
Modifier and Type | Method and 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 primary
SubTask
represented by Queue.Task itself. |
void |
setExecutable(Queue.Executable executable)
This method is only meant to be called internally by
Executor . |
void |
setExecutor(Executor e) |
String |
toString() |
public final SubTask work
public final WorkUnitContext context
WorkUnit
s.@CheckForNull public Executor getExecutor()
Executor
running this work unit.
Executor.getCurrentWorkUnit()
and getExecutor()
form a bi-directional reachability between them.
public void setExecutor(@CheckForNull Executor e)
@CheckForNull public Queue.Executable getExecutable()
@Restricted(value=org.kohsuke.accmod.restrictions.NoExternalUse.class) public void setExecutable(Queue.Executable executable)
Executor
.public boolean isMainWork()
SubTask
represented by Queue.Task
itself.Copyright © 2004–2021. All rights reserved.