public abstract class QueueListener extends Object implements ExtensionPoint
Queue
.
Queue
is highly synchronized objects, and these callbacks are invoked synchronously.
To avoid the risk of deadlocks and general slow down, please minimize the amount of work callbacks
will perform, and push any sizable work to asynchronous execution via Executor
, such as
Computer.threadPoolForRemoting
.
For the state transition of Queue.Item
in Queue
, please refer to the Queue javadoc.
ExtensionPoint.LegacyInstancesAreScopedToHudson
Constructor and Description |
---|
QueueListener() |
Modifier and Type | Method and Description |
---|---|
static ExtensionList<QueueListener> |
all()
Returns all the registered
QueueListener s. |
void |
onEnterBlocked(Queue.BlockedItem bi)
An item enters the blocked phase when there's someone saying "NO" to it proceeding to the buildable phase,
such as
QueueTaskDispatcher . |
void |
onEnterBuildable(Queue.BuildableItem bi)
An item enters the buildable phase when all signals are green (or blue!) and it's just waiting
for the scheduler to allocate it to the available executor.
|
void |
onEnterWaiting(Queue.WaitingItem wi)
When a task is submitted to the queue, it first gets to the waiting phase,
where it spends until the quiet period runs out and the item becomes executable.
|
void |
onLeaveBlocked(Queue.BlockedItem bi)
An item leaves the blocked phase and becomes buildable when there's no one vetoing.
|
void |
onLeaveBuildable(Queue.BuildableItem bi)
An item leaves the buildable phase.
|
void |
onLeaveWaiting(Queue.WaitingItem wi)
An item leaves the waiting phase when the current time of the system is past its
due date.
|
void |
onLeft(Queue.LeftItem li)
The item has left the queue, either by getting
cancelled or by getting
picked up by an executor and starts running. |
public void onEnterWaiting(Queue.WaitingItem wi)
Queue.WaitingItem.timestamp
public void onLeaveWaiting(Queue.WaitingItem wi)
public void onEnterBlocked(Queue.BlockedItem bi)
QueueTaskDispatcher
. Note that waiting for an executor to become available is not a part of this.public void onLeaveBlocked(Queue.BlockedItem bi)
public void onEnterBuildable(Queue.BuildableItem bi)
public void onLeaveBuildable(Queue.BuildableItem bi)
public void onLeft(Queue.LeftItem li)
cancelled
or by getting
picked up by an executor and starts running.public static ExtensionList<QueueListener> all()
QueueListener
s.Copyright © 2014. All rights reserved.