Package jenkins.model.queue
Interface QueueItem
- All Superinterfaces:
FullyNamedModelObject
,ModelObject
- All Known Implementing Classes:
Queue.BlockedItem
,Queue.BuildableItem
,Queue.Item
,Queue.LeftItem
,Queue.NotWaitingItem
,Queue.WaitingItem
@Restricted(org.kohsuke.accmod.restrictions.Beta.class)
public interface QueueItem
extends FullyNamedModelObject
Interface used by Jelly views to render a queue item through
<t:queue>
.- Since:
- 2.405
-
Method Summary
Modifier and TypeMethodDescriptionConvenience method that returns a read only view of theCause
s associated with this item in the queue as a single string.default String
default String
Works likeModelObject.getDisplayName()
but return the full path that includes all the display names of the ancestors in an unspecified format.long
getId()
Unique ID (per controller) that tracks theQueue.Task
as it moves through different stages in the queue (each represented by different implementations ofQueueItem
and into any subsequentRun
instance (seeRun.getQueueId()
).Returns a human readable presentation of how long this item is already in the queue.Gets a human-readable message about the parameters of this itemgetTask()
getWhy()
Gets a human-readable status message describing why it's in the queue.default boolean
Checks whether a scheduled item may be canceled.boolean
isStuck()
-
Method Details
-
isStuck
boolean isStuck()- Returns:
- true if the item is starving for an executor for too long.
-
getTask
- Returns:
- The underlying
Queue.Task
currently in queue.
-
hasCancelPermission
default boolean hasCancelPermission()Checks whether a scheduled item may be canceled.- Returns:
- by default, the same as
ITask.hasAbortPermission()
-
getId
long getId()Unique ID (per controller) that tracks theQueue.Task
as it moves through different stages in the queue (each represented by different implementations ofQueueItem
and into any subsequentRun
instance (seeRun.getQueueId()
). -
getCausesDescription
Convenience method that returns a read only view of theCause
s associated with this item in the queue as a single string. -
getWhy
Gets a human-readable status message describing why it's in the queue. May return null if there is no cause of blockage. -
getParams
Gets a human-readable message about the parameters of this item -
getInQueueForString
Returns a human readable presentation of how long this item is already in the queue. E.g. something like '3 minutes 40 seconds' -
getDisplayName
- Specified by:
getDisplayName
in interfaceModelObject
- Returns:
- a display name for this queue item; by default,
FullyNamedModelObject.getFullDisplayName()
-
getFullDisplayName
Description copied from interface:FullyNamedModelObject
Works likeModelObject.getDisplayName()
but return the full path that includes all the display names of the ancestors in an unspecified format.- Specified by:
getFullDisplayName
in interfaceFullyNamedModelObject
- Returns:
- the full display name for this queue item; by default,
FullyNamedModelObject.getFullDisplayName()
-