本文整理了Java中hudson.model.Label.getIdleExecutors()
方法的一些代码示例,展示了Label.getIdleExecutors()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Label.getIdleExecutors()
方法的具体详情如下:
包路径:hudson.model.Label
类名称:Label
方法名:getIdleExecutors
[英]Number of idle Executors that can start working immediately.
[中]可以立即开始工作的空闲执行器的数量。
代码示例来源:origin: jenkinsci/jenkins
@Override
public int computeIdleExecutors() {
return Label.this.getIdleExecutors();
}
代码示例来源:origin: jenkinsci/jenkins
public CauseOfBlockage getCauseOfBlockage() {
Jenkins jenkins = Jenkins.getInstance();
if(isBlockedByShutdown(task))
return CauseOfBlockage.fromMessage(Messages._Queue_HudsonIsAboutToShutDown());
List<CauseOfBlockage> causesOfBlockage = transientCausesOfBlockage;
Label label = getAssignedLabel();
List<Node> allNodes = jenkins.getNodes();
if (allNodes.isEmpty())
label = null; // no master/agent. pointless to talk about nodes
if (label != null) {
Set<Node> nodes = label.getNodes();
if (label.isOffline()) {
if (nodes.size() != 1) return new BecauseLabelIsOffline(label);
else return new BecauseNodeIsOffline(nodes.iterator().next());
} else {
if (causesOfBlockage != null && label.getIdleExecutors() > 0) {
return new CompositeCauseOfBlockage(causesOfBlockage);
}
if (nodes.size() != 1) return new BecauseLabelIsBusy(label);
else return new BecauseNodeIsBusy(nodes.iterator().next());
}
} else if (causesOfBlockage != null && new ComputerSet().getIdleExecutors() > 0) {
return new CompositeCauseOfBlockage(causesOfBlockage);
} else {
return CauseOfBlockage.createNeedsMoreExecutor(Messages._Queue_WaitingForNextAvailableExecutor());
}
}
代码示例来源:origin: org.jenkins-ci.main/jenkins-core
@Override
public int computeIdleExecutors() {
return Label.this.getIdleExecutors();
}
代码示例来源:origin: org.eclipse.hudson/hudson-core
@Override
public int computeIdleExecutors() {
return Label.this.getIdleExecutors();
}
代码示例来源:origin: org.jvnet.hudson.main/hudson-core
@Override
public int computeIdleExecutors() {
return Label.this.getIdleExecutors();
}
代码示例来源:origin: org.eclipse.hudson.main/hudson-core
@Override
public int computeIdleExecutors() {
return Label.this.getIdleExecutors();
}
代码示例来源:origin: hudson/hudson-2.x
@Override
public int computeIdleExecutors() {
return Label.this.getIdleExecutors();
}
代码示例来源:origin: org.jenkins-ci.main/jenkins-core
public CauseOfBlockage getCauseOfBlockage() {
Jenkins jenkins = Jenkins.getInstance();
if(isBlockedByShutdown(task))
return CauseOfBlockage.fromMessage(Messages._Queue_HudsonIsAboutToShutDown());
List<CauseOfBlockage> causesOfBlockage = transientCausesOfBlockage;
Label label = getAssignedLabel();
List<Node> allNodes = jenkins.getNodes();
if (allNodes.isEmpty())
label = null; // no master/agent. pointless to talk about nodes
if (label != null) {
Set<Node> nodes = label.getNodes();
if (label.isOffline()) {
if (nodes.size() != 1) return new BecauseLabelIsOffline(label);
else return new BecauseNodeIsOffline(nodes.iterator().next());
} else {
if (causesOfBlockage != null && label.getIdleExecutors() > 0) {
return new CompositeCauseOfBlockage(causesOfBlockage);
}
if (nodes.size() != 1) return new BecauseLabelIsBusy(label);
else return new BecauseNodeIsBusy(nodes.iterator().next());
}
} else if (causesOfBlockage != null && new ComputerSet().getIdleExecutors() > 0) {
return new CompositeCauseOfBlockage(causesOfBlockage);
} else {
return CauseOfBlockage.createNeedsMoreExecutor(Messages._Queue_WaitingForNextAvailableExecutor());
}
}
内容来源于网络,如有侵权,请联系作者删除!