Package hudson.model

Class ComputerSet

    • Constructor Detail

      • ComputerSet

        public ComputerSet()
    • Method Detail

      • get_all

        @Exported(name="computer",
                  inline=true)
        public Computer[] get_all()
      • get_slaveNames

        public List<String> get_slaveNames()
        Gets all the agent names.
      • getTotalExecutors

        @Exported
        public int getTotalExecutors()
        Number of total Executors that belong to this label that are functioning.

        This excludes executors that belong to offline nodes.

      • getBusyExecutors

        @Exported
        public int getBusyExecutors()
        Number of busy Executors that are carrying out some work right now.
      • getIdleExecutors

        public int getIdleExecutors()
        getTotalExecutors()-getBusyExecutors(), plus executors that are being brought online.
      • getSearchUrl

        public String getSearchUrl()
        Description copied from interface: SearchItem
        Returns the URL of this item relative to the parent SearchItem.
        Specified by:
        getSearchUrl in 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

        public Computer getDynamic​(String token,
                                   org.kohsuke.stapler.StaplerRequest req,
                                   org.kohsuke.stapler.StaplerResponse rsp)
      • do_launchAll

        public void do_launchAll​(org.kohsuke.stapler.StaplerRequest req,
                                 org.kohsuke.stapler.StaplerResponse rsp)
                          throws IOException
        Throws:
        IOException
      • doUpdateNow

        public void doUpdateNow​(org.kohsuke.stapler.StaplerRequest req,
                                org.kohsuke.stapler.StaplerResponse rsp)
                         throws IOException,
                                javax.servlet.ServletException
        Triggers the schedule update now. TODO: ajax on the client side to wait until the update completion might be nice.
        Throws:
        IOException
        javax.servlet.ServletException
      • doCreateItem

        public void doCreateItem​(org.kohsuke.stapler.StaplerRequest req,
                                 org.kohsuke.stapler.StaplerResponse rsp,
                                 @QueryParameter
                                 String name,
                                 @QueryParameter
                                 String mode,
                                 @QueryParameter
                                 String from)
                          throws IOException,
                                 javax.servlet.ServletException
        First check point in creating a new agent.
        Throws:
        IOException
        javax.servlet.ServletException
      • checkName

        public String checkName​(String name)
                         throws Failure
        Makes sure that the given name is good as an agent name.
        Returns:
        trimmed name if valid; throws ParseException if not
        Throws:
        Failure
      • doCheckName

        public FormValidation doCheckName​(@QueryParameter
                                          String value)
                                   throws IOException,
                                          javax.servlet.ServletException
        Makes sure that the given name is good as an agent name.
        Throws:
        IOException
        javax.servlet.ServletException
      • getApi

        public Api getApi()
      • getDescriptor

        public Descriptor<ComputerSet> getDescriptor()
        Description copied from interface: Describable
        Gets the descriptor for this instance.

        Descriptor is a singleton for every concrete Describable implementation, so if a.getClass() == b.getClass() then by default a.getDescriptor() == b.getDescriptor() as well. (In rare cases a single implementation class may be used for instances with distinct descriptors.)

        Specified by:
        getDescriptor in interface Describable<ComputerSet>
      • initialize

        public static void initialize()
        Just to force the execution of the static initializer.
      • getComputerNames

        @NonNull
        public static List<String> getComputerNames()
        Returns:
        The list of strings of computer names (excluding master)
        Since:
        2.14