Package hudson.model
Interface Queue.Executable
-
- All Superinterfaces:
Runnable
- All Known Implementing Classes:
AbstractBuild
,Build
,FreeStyleBuild
- Enclosing class:
- Queue
@StaplerAccessibleType public static interface Queue.Executable extends Runnable
Represents the real meat of the computation run byExecutor
.Views
Implementation must have
executorCell.jelly
, which is used to render the HTML that indicates this executable is executing.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default long
getEstimatedDuration()
Estimate of how long will it take to execute this executable.SubTask
getParent()
Task from which this executable was created.default Queue.Executable
getParentExecutable()
An umbrella executable (such as aRun
) of which this is one part.void
run()
Called byExecutor
to perform the task.String
toString()
Used to render the HTML.
-
-
-
Method Detail
-
getParent
@NonNull SubTask getParent()
Task from which this executable was created.Since this method went through a signature change in 1.377, the invocation may results in
AbstractMethodError
. UseExecutables.getParentOf(Queue.Executable)
that avoids this.
-
getParentExecutable
@CheckForNull default Queue.Executable getParentExecutable()
An umbrella executable (such as aRun
) of which this is one part. Some invariants:getParent().getOwnerTask() == getParent() || getParentExecutable().getParent() == getParent().getOwnerTask()
getParent().getOwnerExecutable() == null || getParentExecutable() == getParent().getOwnerExecutable()
- Returns:
- a distinct executable (never
this
, unlike the default ofSubTask.getOwnerTask()
!); or null if this executable was already at top level - Since:
- 2.313, but implementations can already implement this with a lower core dependency.
- See Also:
SubTask.getOwnerExecutable()
-
run
void run() throws AsynchronousExecution
Called byExecutor
to perform the task.- Specified by:
run
in interfaceRunnable
- Throws:
AsynchronousExecution
- if you would like to continue without consuming a thread
-
getEstimatedDuration
default long getEstimatedDuration()
Estimate of how long will it take to execute this executable. Measured in milliseconds.- Returns:
- -1 if it's impossible to estimate; default,
SubTask.getEstimatedDuration()
- Since:
- 1.383
-
-