Interface AgentTypeManager

    • Method Detail

      • updateAgentType

        void updateAgentType​(@NotNull
                             BuildAgentEx agent,
                             boolean isInitialUpdate)
        updates agent type parameters from the agent's parameters
        Parameters:
        agent - the agent
        isInitialUpdate - if then this is the update of agent type parameters when the agent is first registered, if false then this is a periodical update which happens while the agent is already registered and runs some builds
        Since:
        2020.1.1
      • updateAgentType

        void updateAgentType​(int agentTypeId,
                             @NotNull
                             AgentDescription agentDescription,
                             boolean isInitialUpdate)
        updates agent type parameters from the agent's parameters
        Parameters:
        agentTypeId - agent type id
        agentDescription - agent description
        isRuntimeUpdate - whether the update is runtime (during agent operation). False means that update goes from agent start.
        Since:
        2020.1.1
      • assignAgentType

        int assignAgentType​(@NotNull
                            BuildAgentEx agent)
        Creates agent type for specified agent if agent does not have one and assigns it to the agent.
        Parameters:
        agent -
        Returns:
        id of new agent type
      • getOrCreateAgentTypeId

        int getOrCreateAgentTypeId​(@NotNull
                                   AgentTypeKey key,
                                   int defaultRawPoolId)
        Maps created agent type key into agentTypeId. This method should lookup to the storage or allocate new item.
        Specified by:
        getOrCreateAgentTypeId in interface AgentTypeStorage
        Parameters:
        key - agent type key received from plugin
        defaultRawPoolId - raw pool id to assign agent type to, if one doesn't exist.
        Returns:
        agent type id
      • includeRunConfigurationsToAllowed

        void includeRunConfigurationsToAllowed​(int agentTypeId,
                                               @NotNull
                                               String[] buildTypeIds)
      • excludeRunConfigurationsFromAllowed

        void excludeRunConfigurationsFromAllowed​(int agentTypeId,
                                                 @NotNull
                                                 String[] buildTypeIds)
      • isCanRunConfiguration

        boolean isCanRunConfiguration​(int agentTypeId,
                                      @NotNull
                                      BuildTypeDescriptor buildType)
      • getCanRunConfigurations

        @NotNull
        Set<String> getCanRunConfigurations​(int agentTypeId)
      • getNumberOfCompatibleConfigurations

        int getNumberOfCompatibleConfigurations​(@NotNull
                                                SAgentType agentType)
      • getNumberOfIncompatibleConfigurations

        int getNumberOfIncompatibleConfigurations​(@NotNull
                                                  SAgentType agentType)