Class ConnectedAgentsDistributor
- java.lang.Object
-
- jetbrains.buildServer.serverSide.impl.buildDistribution.ConnectedAgentsDistributor
-
- All Implemented Interfaces:
Distributor<SBuildAgent>
public class ConnectedAgentsDistributor extends Object implements Distributor<SBuildAgent>
- Author:
- Eugene Petrenko Created: 09.09.2009 21:52:16
-
-
Field Summary
Fields Modifier and Type Field Description static String
ALLOW_START_BUIDLS_ON_OUTDATED_AGENTS
static String
DISTRIBUTE_TO_AGENTS_WHERE_BUILDS_ARE_FINISHING_SOON
static String
SOON_TO_BECOME_IDLE_MAX_TIME_LEFT_SECONDS
-
Constructor Summary
Constructors Constructor Description ConnectedAgentsDistributor(BuildDistributorInputEx buildDistributorInput, Map<QueuedBuildInfo,WaitReason> waitReasons, boolean emulationMode, ExtensionHolder extensionHolder, BuildAgentsComparatorProvider comparatorsProvider)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
canProcessQueuedBuild(QueuedBuildInfo qbi, Map<QueuedBuildInfo,WaitReason> waitReasons)
Distributor could skip a buildWaitReason
filterAvailableAgents(BuildDistributorInput distributorInput, QueuedBuildInfo queuedBuild, List<SBuildAgent> canRunOn, Map<QueuedBuildInfo,SBuildAgent> distributedBuilds, Map<String,Object> customData)
Could filter available agents todo why it's not performed in getCompatibleCandidates()?CompatibleAgentsResult<SBuildAgent>
getCompatibleCandidates(QueuedBuildInfo queuedBuild, Set<SBuildAgent> distributedAgents)
Should return an incapsulated list of compatible agents or a WaitReason why the build cannot be startedString
getName()
boolean
shouldFilterOutOutdatedAgents()
void
sortAvailableAgents(List<SBuildAgent> canRunOn, QueuedBuildInfo queuedBuildInfo)
Sorts agents available for the queued build, so that the most preferred agents were first in the list
-
-
-
Field Detail
-
ALLOW_START_BUIDLS_ON_OUTDATED_AGENTS
public static final String ALLOW_START_BUIDLS_ON_OUTDATED_AGENTS
- See Also:
- Constant Field Values
-
DISTRIBUTE_TO_AGENTS_WHERE_BUILDS_ARE_FINISHING_SOON
public static final String DISTRIBUTE_TO_AGENTS_WHERE_BUILDS_ARE_FINISHING_SOON
- See Also:
- Constant Field Values
-
SOON_TO_BECOME_IDLE_MAX_TIME_LEFT_SECONDS
public static final String SOON_TO_BECOME_IDLE_MAX_TIME_LEFT_SECONDS
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ConnectedAgentsDistributor
public ConnectedAgentsDistributor(@NotNull BuildDistributorInputEx buildDistributorInput, @Nullable Map<QueuedBuildInfo,WaitReason> waitReasons, boolean emulationMode, @NotNull ExtensionHolder extensionHolder, @NotNull BuildAgentsComparatorProvider comparatorsProvider)
-
-
Method Detail
-
getCompatibleCandidates
@NotNull public CompatibleAgentsResult<SBuildAgent> getCompatibleCandidates(@NotNull QueuedBuildInfo queuedBuild, @NotNull Set<SBuildAgent> distributedAgents)
Description copied from interface:Distributor
Should return an incapsulated list of compatible agents or a WaitReason why the build cannot be started- Specified by:
getCompatibleCandidates
in interfaceDistributor<SBuildAgent>
- Returns:
- CompatibleAgentsResult
-
filterAvailableAgents
public WaitReason filterAvailableAgents(@NotNull BuildDistributorInput distributorInput, @NotNull QueuedBuildInfo queuedBuild, @NotNull List<SBuildAgent> canRunOn, @NotNull Map<QueuedBuildInfo,SBuildAgent> distributedBuilds, @NotNull Map<String,Object> customData)
Description copied from interface:Distributor
Could filter available agents todo why it's not performed in getCompatibleCandidates()?- Specified by:
filterAvailableAgents
in interfaceDistributor<SBuildAgent>
- Returns:
-
sortAvailableAgents
public void sortAvailableAgents(@NotNull List<SBuildAgent> canRunOn, @NotNull QueuedBuildInfo queuedBuildInfo)
Description copied from interface:Distributor
Sorts agents available for the queued build, so that the most preferred agents were first in the list- Specified by:
sortAvailableAgents
in interfaceDistributor<SBuildAgent>
-
canProcessQueuedBuild
public boolean canProcessQueuedBuild(@NotNull QueuedBuildInfo qbi, @NotNull Map<QueuedBuildInfo,WaitReason> waitReasons)
Description copied from interface:Distributor
Distributor could skip a build- Specified by:
canProcessQueuedBuild
in interfaceDistributor<SBuildAgent>
- Returns:
- false if build should be skipped
-
getName
@NotNull public String getName()
- Specified by:
getName
in interfaceDistributor<SBuildAgent>
-
shouldFilterOutOutdatedAgents
public boolean shouldFilterOutOutdatedAgents()
-
-