public Label(String name) { this.name = name; // passing these causes an infinite loop - getTotalExecutors(),getBusyExecutors()); this.loadStatistics = new LoadStatistics(0,0) { @Override public int computeIdleExecutors() { return Label.this.getIdleExecutors(); } @Override public int computeTotalExecutors() { return Label.this.getTotalExecutors(); } @Override public int computeQueueLength() { return Jenkins.getInstance().getQueue().countBuildableItemsFor(Label.this); } @Override protected Set<Node> getNodes() { return Label.this.getNodes(); } @Override protected boolean matches(Queue.Item item, SubTask subTask) { final Label l = item.getAssignedLabelFor(subTask); return l != null && Label.this.matches(l.name); } }; this.nodeProvisioner = new NodeProvisioner(this, loadStatistics); }
public Label(String name) { this.name = name; // passing these causes an infinite loop - getTotalExecutors(),getBusyExecutors()); this.loadStatistics = new LoadStatistics(0,0) { @Override public int computeIdleExecutors() { return Label.this.getIdleExecutors(); } @Override public int computeTotalExecutors() { return Label.this.getTotalExecutors(); } @Override public int computeQueueLength() { return Hudson.getInstance().getQueue().countBuildableItemsFor(Label.this); } }; this.nodeProvisioner = new NodeProvisioner(this, loadStatistics); }
public Label(String name) { this.name = name; // passing these causes an infinite loop - getTotalExecutors(),getBusyExecutors()); this.loadStatistics = new LoadStatistics(0, 0) { @Override public int computeIdleExecutors() { return Label.this.getIdleExecutors(); } @Override public int computeTotalExecutors() { return Label.this.getTotalExecutors(); } @Override public int computeQueueLength() { return Hudson.getInstance().getQueue().countBuildableItemsFor(Label.this); } }; this.nodeProvisioner = new NodeProvisioner(this, loadStatistics); }
public Label(String name) { this.name = name; // passing these causes an infinite loop - getTotalExecutors(),getBusyExecutors()); this.loadStatistics = new LoadStatistics(0,0) { @Override public int computeIdleExecutors() { return Label.this.getIdleExecutors(); } @Override public int computeTotalExecutors() { return Label.this.getTotalExecutors(); } @Override public int computeQueueLength() { return Hudson.getInstance().getQueue().countBuildableItemsFor(Label.this); } }; this.nodeProvisioner = new NodeProvisioner(this, loadStatistics); }
public Label(String name) { this.name = name; // passing these causes an infinite loop - getTotalExecutors(),getBusyExecutors()); this.loadStatistics = new LoadStatistics(0,0) { @Override public int computeIdleExecutors() { return Label.this.getIdleExecutors(); } @Override public int computeTotalExecutors() { return Label.this.getTotalExecutors(); } @Override public int computeQueueLength() { return Hudson.getInstance().getQueue().countBuildableItemsFor(Label.this); } }; this.nodeProvisioner = new NodeProvisioner(this, loadStatistics); }
public Label(String name) { this.name = name; // passing these causes an infinite loop - getTotalExecutors(),getBusyExecutors()); this.loadStatistics = new LoadStatistics(0,0) { @Override public int computeIdleExecutors() { return Label.this.getIdleExecutors(); } @Override public int computeTotalExecutors() { return Label.this.getTotalExecutors(); } @Override public int computeQueueLength() { return Jenkins.getInstance().getQueue().countBuildableItemsFor(Label.this); } @Override protected Set<Node> getNodes() { return Label.this.getNodes(); } @Override protected boolean matches(Queue.Item item, SubTask subTask) { final Label l = item.getAssignedLabelFor(subTask); return l != null && Label.this.matches(l.name); } }; this.nodeProvisioner = new NodeProvisioner(this, loadStatistics); }