diff --git a/core/src/main/java/hudson/model/Queue.java b/core/src/main/java/hudson/model/Queue.java index 7e922a64f1..77163a6de3 100644 --- a/core/src/main/java/hudson/model/Queue.java +++ b/core/src/main/java/hudson/model/Queue.java @@ -121,23 +121,26 @@ public class Queue extends ResourceController implements Saveable { * This is an offer from the queue to an executor. * *
- * It eventually receives a {@link #item} to build.
+ * An idle executor (that calls {@link Queue#pop()} creates
+ * a new {@link JobOffer} and gets itself {@linkplain Queue#parked parked},
+ * and we'll eventually hand out an {@link #item} to build.
*/
- private static class JobOffer {
- final Executor executor;
+ public static class JobOffer {
+ public final Executor executor;
/**
* Used to wake up an executor, when it has an offered
* {@link Project} to build.
*/
- final OneShotEvent event = new OneShotEvent();
+ private final OneShotEvent event = new OneShotEvent();
+
/**
* The project that this {@link Executor} is going to build.
* (Or null, in which case event is used to trigger a queue maintenance.)
*/
- BuildableItem item;
+ private BuildableItem item;
- public JobOffer(Executor executor) {
+ private JobOffer(Executor executor) {
this.executor = executor;
}
@@ -161,9 +164,9 @@ public class Queue extends ResourceController implements Saveable {
}
/**
- * The executors that are currently parked while waiting for a job to run.
+ * The executors that are currently waiting for a job to run.
*/
- private final Map