提交 2bba3bca 编写于 作者: K Kohsuke Kawaguchi

Exposed the pending provisioning requests to outside.

上级 e0b31e10
......@@ -34,6 +34,7 @@ import hudson.model.MultiStageTimeSeries.TimeScale;
import hudson.Extension;
import java.awt.Color;
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.concurrent.Future;
import java.util.concurrent.ExecutionException;
import java.util.List;
......@@ -84,7 +85,7 @@ public class NodeProvisioner {
*/
private final Label label;
private List<PlannedNode> pendingLaunches = new ArrayList<PlannedNode>();
private List<PlannedNode> pendingLaunches = new CopyOnWriteArrayList<PlannedNode>();
/**
* Exponential moving average of the "planned capacity" over time, which is the number of
......@@ -101,6 +102,17 @@ public class NodeProvisioner {
this.stat = loadStatistics;
}
/**
* Nodes that are being launched.
*
* @return
* Can be empty but never null
* @since 1.401
*/
public List<PlannedNode> getPendingLaunches() {
return new ArrayList<PlannedNode>(pendingLaunches);
}
/**
* Periodically invoked to keep track of the load.
* Launches additional nodes if necessary.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册