Class WorkUnit

java.lang.Object
hudson.model.queue.WorkUnit

public final class WorkUnit extends Object
Represents a unit of hand-over to Executor from Queue.
Since:
1.377
Author:
Kohsuke Kawaguchi
  • Field Details

  • Method Details

    • getExecutor

      @CheckForNull public Executor getExecutor()
      Executor running this work unit.

      Executor.getCurrentWorkUnit() and getExecutor() form a bi-directional reachability between them.

    • setExecutor

      public void setExecutor(@CheckForNull Executor e)
    • getExecutable

      @CheckForNull public Queue.Executable getExecutable()
      If the execution has already started, return the executable that was created.
    • setExecutable

      @Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public void setExecutable(Queue.Executable executable)
      This method is only meant to be called internally by Executor.
    • isMainWork

      public boolean isMainWork()
      Is this work unit the "main work", which is the primary SubTask represented by Queue.Task itself.
    • toString

      public String toString()
      Overrides:
      toString in class Object