本文整理了Java中hudson.model.Computer.isPartiallyIdle()
方法的一些代码示例,展示了Computer.isPartiallyIdle()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Computer.isPartiallyIdle()
方法的具体详情如下:
包路径:hudson.model.Computer
类名称:Computer
方法名:isPartiallyIdle
[英]Returns true if this computer has some idle executors that can take more workload.
[中]如果此计算机的某些空闲执行器可能会承担更多工作负载,则返回true。
代码示例来源:origin: jenkinsci/jenkins
final HashMap<Computer, Integer> availableComputers = new HashMap<>();
for (Computer o : Jenkins.get().getComputers()) {
if ((o.isOnline() || o.isConnecting()) && o.isPartiallyIdle() && o.isAcceptingTasks()) {
final int idleExecutors = o.countIdle();
if (idleExecutors>0)
代码示例来源:origin: org.jenkins-ci.main/jenkins-core
final HashMap<Computer, Integer> availableComputers = new HashMap<Computer, Integer>();
for (Computer o : Jenkins.getInstance().getComputers()) {
if ((o.isOnline() || o.isConnecting()) && o.isPartiallyIdle() && o.isAcceptingTasks()) {
final int idleExecutors = o.countIdle();
if (idleExecutors>0)
代码示例来源:origin: org.eclipse.hudson/hudson-core
CauseOfBlockage c = null;
for (Node node : allNodes) {
if (node.toComputer().isPartiallyIdle()) {
c = canTake(node);
if (c == null) {
内容来源于网络,如有侵权,请联系作者删除!