added a convenience method.

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@9400 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
kohsuke committed 2008-05-18 22:02:55 +00:00
1 parent fc0f23c017
commit c30c3a80ac
1 file changed
+10
@@ -250,6 +250,16 @@ public abstract class Computer extends AbstractModelObject {
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.
*/