java.lang.Object
java.lang.Enum<QueueItemStatus>
org.jenkinsci.plugins.ParameterizedRemoteTrigger.remoteJob.QueueItemStatus
All Implemented Interfaces:
Serializable, Comparable<QueueItemStatus>

public enum QueueItemStatus extends Enum<QueueItemStatus>
This class implements the status of an item while it is on the queue.

See Queue.


 (enter Queue) --> WAITING --+--> BLOCKED
                          |          ^
                          |          |
                          |          v
                          +-------> BUILDABLE ---> PENDING ---> LEFT --> EXECUTED
                                       ^              |
                                       |              |
                                       +---(rarely)---+

When the remote build is triggered, the remote job enters the queue (waiting list) and the queue item status is WAITING.

After that, if there is another build already in progress, the queue item status changes to BLOCKED.

On the contrary, if there is not another build in progress, the queue item status changes to BUILDABLE.

Once the queue item is buildable, it needs to wait for an available executor, and the status changes to PENDING.

If the node disappears before the execution starts, the status moves back to BUILDABLE, but this is not the normal case.

When there is an available executor and the execution starts, the queue item leaves the queue, and the status changes to LEFT.

When the remote job leaves the queue, the build number and the build URL are available. The build URL can be used to request information about the remote job while it is being executed.

Sometimes, we did face some issues, because the item left the queue but this properties where not available, therefore the status EXECUTED was added.

When this properties are available, the queue item status changes to EXECUTED. This is the final status.

In addition, at any status, an item can be removed from the queue, in this case an AbortException is thrown.

  • Enum Constant Details

    • WAITING

      public static final QueueItemStatus WAITING
      If a queue item enters the queue (waiting list).
    • BLOCKED

      public static final QueueItemStatus BLOCKED
      If another build is already in progress.
    • BUILDABLE

      public static final QueueItemStatus BUILDABLE
      If there is not another build in progress.
    • PENDING

      public static final QueueItemStatus PENDING
      If the queue item is waiting for an available executor.
    • LEFT

      public static final QueueItemStatus LEFT
      If there is an available executor and no build is already in progress.
    • EXECUTED

      public static final QueueItemStatus EXECUTED
      The queue item left the queue and the build information (build number and build URL) is available.
    • CANCELLED

      public static final QueueItemStatus CANCELLED
      If the queue item was cancelled and therefore it will not be executed.
  • Method Details

    • values

      public static QueueItemStatus[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static QueueItemStatus valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • toString

      public String toString()
      Overrides:
      toString in class Enum<QueueItemStatus>