Package hudson.model

Interface Queue.Executable

All Superinterfaces:
Runnable, WithConsoleUrl
All Known Implementing Classes:
AbstractBuild, Build, FreeStyleBuild
Enclosing class:
Queue

@StaplerAccessibleType public static interface Queue.Executable extends Runnable, WithConsoleUrl
Represents the real meat of the computation run by Executor.

Views

Implementation must have executorCell.jelly, which is used to render the HTML that indicates this executable is executing.

  • Method Details

    • 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. Use Executables.getParentOf(Queue.Executable) that avoids this.

    • getParentExecutable

      @CheckForNull default Queue.Executable getParentExecutable()
      An umbrella executable (such as a Run) 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 of SubTask.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:
    • run

      void run() throws AsynchronousExecution
      Called by Executor to perform the task.
      Specified by:
      run in interface Runnable
      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
    • getConsoleUrl

      default String getConsoleUrl()
      Handles cases such as PlaceholderExecutable for Pipeline node steps.
      Specified by:
      getConsoleUrl in interface WithConsoleUrl
      Returns:
      by default, that of getParentExecutable() if defined
    • toString

      String toString()
      Used to render the HTML. Should be a human readable text of what this executable is.
      Overrides:
      toString in class Object