|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecthudson.model.queue.QueueTaskFilter
public abstract class QueueTaskFilter
Base class for defining filter Queue.Task.
| Constructor Summary | |
|---|---|
protected |
QueueTaskFilter(Queue.Task base)
|
| Method Summary | |
|---|---|
void |
checkAbortPermission()
Checks the permission to see if the current user can abort this executable. |
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. |
CauseOfBlockage |
getCauseOfBlockage()
If the execution of this task should be blocked for temporary reasons, this method returns a non-null object explaining why. |
String |
getDisplayName()
Used for rendering HTML. |
long |
getEstimatedDuration()
Estimate of how long will it take to execute this task. |
String |
getFullDisplayName()
|
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. |
String |
getName()
Unique name of this task. |
Queue.Task |
getOwnerTask()
Gets the Queue.Task that this subtask belongs to. |
ResourceList |
getResourceList()
Gets the list of Resources that this task requires. |
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. |
Collection<? extends SubTask> |
getSubTasks()
Obtains the SubTasks that constitute this task. |
String |
getUrl()
Returns the URL of this task relative to the context root of the application. |
String |
getWhyBlocked()
|
boolean |
hasAbortPermission()
Works just like Queue.Task.checkAbortPermission() except it indicates the status by a return value,
instead of exception. |
boolean |
isBuildBlocked()
Returns true if the execution should be blocked for temporary reasons. |
boolean |
isConcurrentBuild()
True if the task allows concurrent builds, where the same Queue.TransientTask is executed
by multiple executors concurrently on the same or different nodes. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected QueueTaskFilter(Queue.Task base)
| Method Detail |
|---|
public Label getAssignedLabel()
SubTaskLabel. Otherwise null, indicating
it can run on anywhere.
getAssignedLabel in interface SubTaskpublic Node getLastBuiltOn()
SubTask
getLastBuiltOn in interface SubTaskpublic boolean isBuildBlocked()
Queue.Task
Short-hand for getCauseOfBlockage()!=null.
isBuildBlocked in interface Queue.Taskpublic String getWhyBlocked()
getWhyBlocked in interface Queue.Taskpublic CauseOfBlockage getCauseOfBlockage()
Queue.TaskOtherwise this method returns null, indicating that the build can proceed right away.
This can be used to define mutual exclusion that goes beyond
ResourceActivity.getResourceList().
getCauseOfBlockage in interface Queue.Taskpublic String getName()
Queue.Task
This method is no longer used, left here for compatibility. Just return ModelObject.getDisplayName().
getName in interface Queue.Taskpublic String getFullDisplayName()
getFullDisplayName in interface Queue.TaskItem.getFullDisplayName()public long getEstimatedDuration()
SubTask
getEstimatedDuration in interface SubTask
public Queue.Executable createExecutable()
throws IOException
SubTaskQueue.Executable, which performs the actual execution of the task.
createExecutable in interface SubTaskIOExceptionpublic void checkAbortPermission()
Queue.Task
checkAbortPermission in interface Queue.Taskpublic boolean hasAbortPermission()
Queue.TaskQueue.Task.checkAbortPermission() except it indicates the status by a return value,
instead of exception.
hasAbortPermission in interface Queue.Taskpublic String getUrl()
Queue.TaskWhen the user clicks an item in the queue, this is the page where the user is taken to. Hudson expects the current instance to be bound to the URL returned by this method.
getUrl in interface Queue.Taskpublic boolean isConcurrentBuild()
Queue.TaskQueue.TransientTask is executed
by multiple executors concurrently on the same or different nodes.
isConcurrentBuild in interface Queue.Taskpublic String getDisplayName()
ResourceActivity
getDisplayName in interface ModelObjectgetDisplayName in interface ResourceActivitypublic ResourceList getResourceList()
ResourceActivityResources that this task requires.
Used to make sure no two conflicting tasks run concurrently.
This method must always return the ResourceList
that contains the exact same set of Resources.
If the activity doesn't lock any resources, just
return new ResourceList().
getResourceList in interface ResourceActivitypublic Collection<? extends SubTask> getSubTasks()
Queue.TaskSubTasks that constitute this task.
The collection returned by this method must also contain the primary SubTask
represented by this Queue.TransientTask object itself as the first element.
The returned value is read-only.
At least size 1.
Since this is a newly added method, the invocation may results in AbstractMethodError.
Use Tasks#getSubTasksOf(Task) that avoids this.
getSubTasks in interface Queue.Taskpublic final Queue.Task getOwnerTask()
SubTaskQueue.Task that this subtask belongs to.
getOwnerTask in interface SubTaskpublic Object getSameNodeConstraint()
SubTaskSubTasks 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.
getSameNodeConstraint in interface SubTask
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||