提交 c30c3a80 编写于 作者: K kohsuke

added a convenience method.

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@9400 71c3de6d-444a-0410-be80-ed276b4c234a
上级 fc0f23c0
...@@ -250,6 +250,16 @@ public abstract class Computer extends AbstractModelObject { ...@@ -250,6 +250,16 @@ public abstract class Computer extends AbstractModelObject {
return new ArrayList<Executor>(executors); return new ArrayList<Executor>(executors);
} }
/**
* Returns true if all the executors of this computer is idle.
*/
public boolean isIdle() {
for (Executor e : executors)
if(!e.isIdle())
return false;
return true;
}
/** /**
* Called by {@link Executor} to kill excessive executors from this computer. * Called by {@link Executor} to kill excessive executors from this computer.
*/ */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册