Interface BuildAgentManagerEx

    • Method Detail

      • updateAgentParameters

        void updateAgentParameters​(int agentId,
                                   @NotNull
                                   String authorizationToken,
                                   @NotNull
                                   AgentDescription newAgentDescription)
        Sets agent parameters to the database.

        This method is called by an agent when its parameters are changes, i.e. if one of agent-side plugins has changed agents parameters.

      • unregisterAgent

        void unregisterAgent​(int agentId)
      • unregisterAgent

        void unregisterAgent​(int id,
                             String reason)
      • unregisterAllAgents

        void unregisterAllAgents​(String reason,
                                 boolean shouldCancelRunningBuilds)
      • getRegisteredAgents

        List<BuildAgentEx> getRegisteredAgents​(boolean includeUnauthorized)
        Description copied from interface: BuildAgentManager
        Returns all registered agents. Registered means connected at the moment of call.
        Specified by:
        getRegisteredAgents in interface BuildAgentManager
        Parameters:
        includeUnauthorized - if true, unauthorized agents, i.e. agents which cannot run builds until authorized by admin
        Returns:
        see above
      • pingAllAgents

        void pingAllAgents()
      • getUnregisteredAgents

        List<BuildAgentEx> getUnregisteredAgents()
        Description copied from interface: BuildAgentManager
        Returns list of all currently unregistered and authorized agents, i.e. agents registered on server some time ago, but currently unregistered by server because they are either not responding, or upgrading. This list doesn't include unauthorized agents. The list is sorted by agent registration date in reverse order.
        Specified by:
        getUnregisteredAgents in interface BuildAgentManager
        Returns:
        list of all currently unregistered agents
      • getAllAgents

        List<BuildAgentEx> getAllAgents​(boolean includeUnauthorized)
      • findAgentById

        @Nullable
        BuildAgentEx findAgentById​(int agentId,
                                   boolean searchUnregistered)
        Description copied from interface: BuildAgentManager
        Searches for an agent with specified id among registered and unregistered agents.
        Specified by:
        findAgentById in interface BuildAgentManager
        Parameters:
        agentId - id of the agent to search
        searchUnregistered - true if unregistered agents should be searched too
        Returns:
        found agent or null
      • findAgentByName

        @Nullable
        BuildAgentEx findAgentByName​(@NotNull
                                     String agentName,
                                     boolean searchUnregistered)
        Description copied from interface: BuildAgentManager
        Searches for an agent with specified name among registered and unregistered agents.
        Specified by:
        findAgentByName in interface BuildAgentManager
        Parameters:
        agentName - name of the agent to search
        searchUnregistered - true if unregistered agents should be searched too
        Returns:
        found agent or null
      • findAgentsByAgentTypeIds

        @NotNull
        List<BuildAgentEx> findAgentsByAgentTypeIds​(@NotNull
                                                    Set<Integer> agentTypeIds,
                                                    boolean searchUnregistered)
      • setAgentDistributionMonitor

        void setAgentDistributionMonitor​(@NotNull
                                         AgentDistributionMonitor agentDistributionMonitor)
      • registrationIsTemporallyNotAvailable

        boolean registrationIsTemporallyNotAvailable()