Interface Distributor<T>

    • Method Detail

      • getCompatibleCandidates

        @NotNull
        CompatibleAgentsResult<T> getCompatibleCandidates​(@NotNull
                                                          QueuedBuildInfo queuedBuild,
                                                          @NotNull
                                                          Set<T> distributedAgents)
        Should return an incapsulated list of compatible agents or a WaitReason why the build cannot be started
        Parameters:
        queuedBuild -
        distributedAgents -
        Returns:
        CompatibleAgentsResult
      • filterAvailableAgents

        @Nullable
        WaitReason filterAvailableAgents​(@NotNull
                                         BuildDistributorInput distributorInput,
                                         @NotNull
                                         QueuedBuildInfo queuedBuild,
                                         @NotNull
                                         List<T> canRunOn,
                                         @NotNull
                                         Map<QueuedBuildInfo,​SBuildAgent> distributedBuilds,
                                         @NotNull
                                         Map<String,​Object> customData)
        Could filter available agents todo why it's not performed in getCompatibleCandidates()?
        Parameters:
        distributorInput -
        queuedBuild -
        canRunOn -
        distributedBuilds -
        customData -
        Returns:
      • sortAvailableAgents

        void sortAvailableAgents​(@NotNull
                                 List<T> canRunOn,
                                 @NotNull
                                 QueuedBuildInfo queuedBuildInfo)
        Sorts agents available for the queued build, so that the most preferred agents were first in the list
        Parameters:
        canRunOn -
        queuedBuildInfo -
      • canProcessQueuedBuild

        boolean canProcessQueuedBuild​(@NotNull
                                      QueuedBuildInfo qbi,
                                      @NotNull
                                      Map<QueuedBuildInfo,​WaitReason> waitReasons)
        Distributor could skip a build
        Parameters:
        qbi -
        waitReasons -
        Returns:
        false if build should be skipped
      • getName

        @NotNull
        String getName()