hudson.model.queue
Class QueueSorter

java.lang.Object
  extended by hudson.model.queue.QueueSorter
All Implemented Interfaces:
ExtensionPoint
Direct Known Subclasses:
AbstractQueueSorterImpl

public abstract class QueueSorter
extends Object
implements ExtensionPoint

Singleton extension point for sorting buildable items

Since:
1.343

Nested Class Summary
 
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
 
Constructor Summary
QueueSorter()
           
 
Method Summary
static ExtensionList<QueueSorter> all()
          All registered QueueSorters.
static void installDefaultQueueSorter()
          Installs the default queue sorter.
abstract  void sortBuildableItems(List<Queue.BuildableItem> buildables)
          Sorts the buildable items list.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QueueSorter

public QueueSorter()
Method Detail

sortBuildableItems

public abstract void sortBuildableItems(List<Queue.BuildableItem> buildables)
Sorts the buildable items list. The items at the beginning will be executed before the items at the end of the list.

Parameters:
buildables - List of buildable items in the queue. Never null.

all

public static ExtensionList<QueueSorter> all()
All registered QueueSorters. Only the first one will be picked up, unless explicitly overridden by Queue.setSorter(QueueSorter).


installDefaultQueueSorter

@Initializer(after=JOB_LOADED)
public static void installDefaultQueueSorter()
Installs the default queue sorter. Queue.Queue(hudson.model.LoadBalancer) is too early to do this



Copyright © 2004-2013 Hudson. All Rights Reserved.