Interface Distributor<T>
-
- Type Parameters:
T-
- All Known Implementing Classes:
ConnectedAgentsDistributor,VirtualAgentDistributor
public interface Distributor<T>Agent distributor interface
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleancanProcessQueuedBuild(QueuedBuildInfo qbi, Map<QueuedBuildInfo,WaitReason> waitReasons)Distributor could skip a buildWaitReasonfilterAvailableAgents(BuildDistributorInput distributorInput, QueuedBuildInfo queuedBuild, List<T> canRunOn, Map<QueuedBuildInfo,SBuildAgent> distributedBuilds, Map<String,Object> customData)Could filter available agents todo why it's not performed in getCompatibleCandidates()?CompatibleAgentsResult<T>getCompatibleCandidates(QueuedBuildInfo queuedBuild, Set<T> distributedAgents)Should return an incapsulated list of compatible agents or a WaitReason why the build cannot be startedStringgetName()voidsortAvailableAgents(List<T> canRunOn, QueuedBuildInfo queuedBuildInfo)Sorts agents available for the queued build, so that the most preferred agents were first in the list
-
-
-
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()
-
-