Package hudson.model
Class ComputerSet
java.lang.Object
hudson.model.AbstractModelObject
hudson.model.ComputerSet
- All Implemented Interfaces:
- Describable<ComputerSet>,- ModelObject,- SearchableModelObject,- SearchItem,- ModelObjectWithChildren,- HasWidgets
@ExportedBean
public final class ComputerSet
extends AbstractModelObject
implements Describable<ComputerSet>, ModelObjectWithChildren, HasWidgets
Serves as the top of 
Computers in the URL hierarchy.
 Getter methods are prefixed with '_' to avoid collision with computer names.
- Author:
- Kohsuke Kawaguchi
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic interfaceAllows plugins to override the displayed list of computers.static classstatic class
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionMakes sure that the given name is good as an agent name.voiddo_launchAll(org.kohsuke.stapler.StaplerRequest2 req, org.kohsuke.stapler.StaplerResponse2 rsp) doCheckName(String value) Makes sure that the given name is good as an agent name.doChildrenContextMenu(org.kohsuke.stapler.StaplerRequest2 request, org.kohsuke.stapler.StaplerResponse2 response) Generates the context menu to list up all the children.org.kohsuke.stapler.HttpResponsedoConfigSubmit(org.kohsuke.stapler.StaplerRequest2 req) Accepts submission from the configuration page.voiddoCreateItem(org.kohsuke.stapler.StaplerRequest2 req, org.kohsuke.stapler.StaplerResponse2 rsp, String name, String mode, String from) First check point in creating a new agent.voiddoDoCreateItem(org.kohsuke.stapler.StaplerRequest2 req, org.kohsuke.stapler.StaplerResponse2 rsp, String name, String type) Really creates a new agent.voiddoUpdateNow(org.kohsuke.stapler.StaplerRequest2 req, org.kohsuke.stapler.StaplerResponse2 rsp) Triggers the schedule update now.Computer[]get_all()Deprecated.static List<NodeMonitor> Deprecated.as of 1.301 UsegetMonitors().Gets all the agent names.getApi()intNumber of busyExecutors that are carrying out some work right now.Collection<? extends IComputer> Gets the descriptor for this instance.getDynamic(String token, org.kohsuke.stapler.StaplerRequest2 req, org.kohsuke.stapler.StaplerResponse2 rsp) intgetTotalExecutors()-getBusyExecutors(), plus executors that are being brought online.static DescribableList<NodeMonitor, Descriptor<NodeMonitor>> ExposingNodeMonitor.all()for Jelly binding.static Map<Descriptor<NodeMonitor>, NodeMonitor> Returns a subset pfgetMonitors()that are not ignored.Returns the URL of this item relative to the parentSearchItem.intNumber of totalExecutors that belong to this label that are functioning.static voidinit()static voidJust to force the execution of the static initializer.Methods inherited from class hudson.model.AbstractModelObjectgetSearch, getSearchIndex, getSearchName, makeSearchIndex, requirePOST, sendError, sendError, sendError, sendError, sendError, sendError, sendError, sendErrorMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface jenkins.widgets.HasWidgetsgetWidget, getWidgetsMethods inherited from interface jenkins.model.ModelObjectWithChildrendoChildrenContextMenuMethods inherited from interface hudson.search.SearchItemgetSearchGroup, getSearchIcon
- 
Constructor Details- 
ComputerSetpublic ComputerSet()
 
- 
- 
Method Details- 
getDisplayName- Specified by:
- getDisplayNamein interface- ModelObject
 
- 
get_monitorsDeprecated.as of 1.301 UsegetMonitors().
- 
get_allDeprecated.UsegetComputers()instead.- Returns:
- All Computerinstances managed by this set.
 
- 
getComputers- Returns:
- All IComputerinstances managed by this set, sorted by name.
 
- 
doChildrenContextMenupublic ModelObjectWithContextMenu.ContextMenu doChildrenContextMenu(org.kohsuke.stapler.StaplerRequest2 request, org.kohsuke.stapler.StaplerResponse2 response) throws Exception Description copied from interface:ModelObjectWithChildrenGenerates the context menu to list up all the children.- Specified by:
- doChildrenContextMenuin interface- ModelObjectWithChildren
- Throws:
- Exception
 
- 
getNodeMonitorDescriptorsExposingNodeMonitor.all()for Jelly binding.
- 
getMonitors
- 
getNonIgnoredMonitorsReturns a subset pfgetMonitors()that are not ignored.
- 
get_slaveNamesGets all the agent names.
- 
getTotalExecutors@Exported public int getTotalExecutors()Number of totalExecutors that belong to this label that are functioning.This excludes executors that belong to offline nodes. 
- 
getBusyExecutors@Exported public int getBusyExecutors()Number of busyExecutors that are carrying out some work right now.
- 
getIdleExecutorspublic int getIdleExecutors()getTotalExecutors()-getBusyExecutors(), plus executors that are being brought online.
- 
getSearchUrlDescription copied from interface:SearchItemReturns the URL of this item relative to the parentSearchItem.- Specified by:
- getSearchUrlin interface- SearchItem
- Returns:
- URL like "foo" or "foo/bar". The path can end with '/'. The path that starts with '/' will be interpreted as the absolute path (within the context path of Jenkins.)
 
- 
getDynamic
- 
do_launchAllpublic void do_launchAll(org.kohsuke.stapler.StaplerRequest2 req, org.kohsuke.stapler.StaplerResponse2 rsp) throws IOException - Throws:
- IOException
 
- 
doUpdateNowpublic void doUpdateNow(org.kohsuke.stapler.StaplerRequest2 req, org.kohsuke.stapler.StaplerResponse2 rsp) throws IOException, jakarta.servlet.ServletException Triggers the schedule update now. TODO: ajax on the client side to wait until the update completion might be nice.- Throws:
- IOException
- jakarta.servlet.ServletException
 
- 
doCreateItempublic void doCreateItem(org.kohsuke.stapler.StaplerRequest2 req, org.kohsuke.stapler.StaplerResponse2 rsp, @QueryParameter String name, @QueryParameter String mode, @QueryParameter String from) throws IOException, jakarta.servlet.ServletException First check point in creating a new agent.- Throws:
- IOException
- jakarta.servlet.ServletException
 
- 
doDoCreateItem@POST public void doDoCreateItem(org.kohsuke.stapler.StaplerRequest2 req, org.kohsuke.stapler.StaplerResponse2 rsp, @QueryParameter String name, @QueryParameter String type) throws IOException, jakarta.servlet.ServletException, Descriptor.FormException Really creates a new agent.- Throws:
- IOException
- jakarta.servlet.ServletException
- Descriptor.FormException
 
- 
checkNameMakes sure that the given name is good as an agent name.- Returns:
- trimmed name if valid; throws ParseException if not
- Throws:
- Failure
 
- 
doCheckNamepublic FormValidation doCheckName(@QueryParameter String value) throws IOException, jakarta.servlet.ServletException Makes sure that the given name is good as an agent name.- Throws:
- IOException
- jakarta.servlet.ServletException
 
- 
doConfigSubmit@POST public org.kohsuke.stapler.HttpResponse doConfigSubmit(org.kohsuke.stapler.StaplerRequest2 req) throws IOException, jakarta.servlet.ServletException, Descriptor.FormException Accepts submission from the configuration page.- Throws:
- IOException
- jakarta.servlet.ServletException
- Descriptor.FormException
 
- 
getApi
- 
getDescriptorDescription copied from interface:DescribableGets the descriptor for this instance.Descriptoris a singleton for every concreteDescribableimplementation, so ifa.getClass() == b.getClass()then by defaulta.getDescriptor() == b.getDescriptor()as well. (In rare cases a single implementation class may be used for instances with distinct descriptors.)By default looks for a nested class (conventionally named DescriptorImpl) implementingDescriptorand marked withExtension.- Specified by:
- getDescriptorin interface- Describable<ComputerSet>
 
- 
initializepublic static void initialize()Just to force the execution of the static initializer.
- 
init
- 
getComputerNames- Returns:
- The list of strings of computer names (excluding master)
- Since:
- 2.14
 
 
- 
getComputers()instead.