mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-18 06:22:29 +00:00
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:
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.
|
||||
*/
|
||||
|
||||
Reference in new issue
Block a user