public interface SubTask extends ResourceActivity
Queue.Task
that represents a computation carried out by a single Executor
.
A Queue.Task
consists of a number of SubTask
.
Plugins are encouraged to extend from AbstractSubTask
instead of implementing this interface directly, to maintain
compatibility with future changes to this interface.
Modifier and Type | Method and Description |
---|---|
Queue.Executable |
createExecutable()
Creates
Queue.Executable , which performs the actual execution of the task. |
Label |
getAssignedLabel()
If this task needs to be run on a node with a particular label,
return that
Label . |
long |
getEstimatedDuration()
Estimate of how long will it take to execute this task.
|
Node |
getLastBuiltOn()
If the previous execution of this task run on a certain node
and this task prefers to run on the same node, return that.
|
Queue.Task |
getOwnerTask()
Gets the
Queue.Task that this subtask belongs to. |
Object |
getSameNodeConstraint()
If a subset of
SubTask s of a Queue.Task needs to be collocated with other SubTask s,
those SubTask s should return the equal object here. |
getDisplayName, getResourceList
Label getAssignedLabel()
Label
. Otherwise null, indicating
it can run on anywhere.Node getLastBuiltOn()
long getEstimatedDuration()
@CheckForNull Queue.Executable createExecutable() throws IOException
Queue.Executable
, which performs the actual execution of the task.Queue.Executable
to be launched or null if the executable cannot be
created (e.g. AbstractProject
is disabled)IOException
- Queue.Executable
cannot be created@Nonnull Queue.Task getOwnerTask()
Queue.Task
that this subtask belongs to.Object getSameNodeConstraint()
SubTask
s of a Queue.Task
needs to be collocated with other SubTask
s,
those SubTask
s should return the equal object here. If null, the execution unit isn't under a
colocation constraint.Copyright © 2019. All rights reserved.