public abstract class AbstractQueueTask extends Object implements Queue.Task
Queue.Task
to protect plugins
from new additions to the interface.Constructor and Description |
---|
AbstractQueueTask() |
Modifier and Type | Method and Description |
---|---|
CauseOfBlockage |
getCauseOfBlockage()
If the execution of this task should be blocked for temporary reasons,
this method returns a non-null object explaining why.
|
org.acegisecurity.Authentication |
getDefaultAuthentication()
This default implementation is the historical behaviour, but this is no longer desirable.
|
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. |
Collection<? extends SubTask> |
getSubTasks()
Obtains the
SubTask s that constitute this task. |
boolean |
isConcurrentBuild()
True if the task allows concurrent builds, where the same
Queue.Task is executed
by multiple executors concurrently on the same or different nodes. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
checkAbortPermission, getFullDisplayName, getName, getUrl, getWhyBlocked, hasAbortPermission, isBuildBlocked
getDisplayName
createExecutable, getAssignedLabel, getEstimatedDuration, getLastBuiltOn
getDisplayName, getResourceList
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.Task
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(Queue.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 boolean isConcurrentBuild()
Queue.Task
Queue.Task
is executed
by multiple executors concurrently on the same or different nodes.isConcurrentBuild
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 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
@Nonnull public org.acegisecurity.Authentication getDefaultAuthentication()
Queue.Task.getDefaultAuthentication()
for the contract.getDefaultAuthentication
in interface Queue.Task
QueueItemAuthenticator
,
Tasks.getDefaultAuthenticationOf(Queue.Task)
Copyright © 2014. All rights reserved.