hudson.model.queue
Interface SubTask

All Superinterfaces:
ResourceActivity
All Known Subinterfaces:
BuildableItem, BuildableItemWithBuildWrappers, Queue.FlyweightTask, Queue.NonBlockingTask, Queue.Task, Queue.TransientTask, SCMedItem
All Known Implementing Classes:
AbstractProject, AbstractQueueTask, AbstractSubTask, BaseBuildableProject, FreeStyleProject, MatrixConfiguration, MatrixProject, Project, QueueTaskFilter

public interface SubTask
extends ResourceActivity

A component of 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.

Since:
1.377

Method Summary
 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 SubTasks of a Queue.Task needs to be collocated with other SubTasks, those SubTasks should return the equal object here.
 
Methods inherited from interface hudson.model.ResourceActivity
getDisplayName, getResourceList
 

Method Detail

getAssignedLabel

Label getAssignedLabel()
If this task needs to be run on a node with a particular label, return that Label. Otherwise null, indicating it can run on anywhere.


getLastBuiltOn

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. Otherwise null.


getEstimatedDuration

long getEstimatedDuration()
Estimate of how long will it take to execute this task. Measured in milliseconds.

Returns:
-1 if it's impossible to estimate.

createExecutable

Queue.Executable createExecutable()
                                  throws IOException
Creates Queue.Executable, which performs the actual execution of the task.

Throws:
IOException

getOwnerTask

Queue.Task getOwnerTask()
Gets the Queue.Task that this subtask belongs to.


getSameNodeConstraint

Object getSameNodeConstraint()
If a subset of SubTasks of a Queue.Task needs to be collocated with other SubTasks, those SubTasks should return the equal object here. If null, the execution unit isn't under a colocation constraint.



Copyright © 2004-2013 Hudson. All Rights Reserved.