|
||||||||||
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 Resource s that this task requires. |
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. |
Collection<? extends SubTask> |
getSubTasks()
Obtains the SubTask s 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()
SubTask
Label
. Otherwise null, indicating
it can run on anywhere.
getAssignedLabel
in interface SubTask
public Node getLastBuiltOn()
SubTask
getLastBuiltOn
in interface SubTask
public boolean isBuildBlocked()
Queue.Task
Short-hand for getCauseOfBlockage()!=null
.
isBuildBlocked
in interface Queue.Task
public String getWhyBlocked()
getWhyBlocked
in interface Queue.Task
public CauseOfBlockage getCauseOfBlockage()
Queue.Task
Otherwise 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.Task
public String getName()
Queue.Task
This method is no longer used, left here for compatibility. Just return ModelObject.getDisplayName()
.
getName
in interface Queue.Task
public String getFullDisplayName()
getFullDisplayName
in interface Queue.Task
Item.getFullDisplayName()
public long getEstimatedDuration()
SubTask
getEstimatedDuration
in interface SubTask
public Queue.Executable createExecutable() throws IOException
SubTask
Queue.Executable
, which performs the actual execution of the task.
createExecutable
in interface SubTask
IOException
public void checkAbortPermission()
Queue.Task
checkAbortPermission
in interface Queue.Task
public boolean hasAbortPermission()
Queue.Task
Queue.Task.checkAbortPermission()
except it indicates the status by a return value,
instead of exception.
hasAbortPermission
in interface Queue.Task
public String getUrl()
Queue.Task
When 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.Task
public boolean isConcurrentBuild()
Queue.Task
Queue.TransientTask
is executed
by multiple executors concurrently on the same or different nodes.
isConcurrentBuild
in interface Queue.Task
public String getDisplayName()
ResourceActivity
getDisplayName
in interface ModelObject
getDisplayName
in interface ResourceActivity
public ResourceList getResourceList()
ResourceActivity
Resource
s 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 Resource
s.
If the activity doesn't lock any resources, just
return new ResourceList()
.
getResourceList
in interface ResourceActivity
public Collection<? extends SubTask> getSubTasks()
Queue.Task
SubTask
s 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.Task
public final Queue.Task getOwnerTask()
SubTask
Queue.Task
that this subtask belongs to.
getOwnerTask
in interface SubTask
public Object getSameNodeConstraint()
SubTask
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.
getSameNodeConstraint
in interface SubTask
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |