Class Executables

java.lang.Object
hudson.model.queue.Executables

public class Executables extends Object
Convenience methods around Queue.Executable.
Author:
Kohsuke Kawaguchi
  • Constructor Details

    • Executables

      public Executables()
  • Method Details

    • getParentOf

      @NonNull public static SubTask getParentOf(@NonNull Queue.Executable e) throws Error, RuntimeException
      Due to the return type change in Queue.Executable in 1.377, the caller needs a special precaution now.
      Parameters:
      e - Executable
      Returns:
      Discovered subtask
      Throws:
      Error
      RuntimeException
    • getEstimatedDurationFor

      @Deprecated public static long getEstimatedDurationFor(@CheckForNull Queue.Executable e)
      Deprecated.
      Returns the estimated duration for the executable. If the Executable is null the Estimated Duration can't be evaluated, then -1 is returned. This can happen if Computer.getIdleStartMilliseconds() is called before the executable is set to non-null in Computer.run() or if the executor thread exits prematurely, see JENKINS-30456 Protects against AbstractMethodErrors if the Queue.Executable implementation was compiled against Hudson prior to 1.383
      Parameters:
      e - Executable item
      Returns:
      the estimated duration for a given executable, -1 if the executable is null