public class ExecutableAgentsMatrixImpl extends Object implements ExecutableAgentsMatrix
Constructor and Description |
---|
ExecutableAgentsMatrixImpl() |
Modifier and Type | Method and Description |
---|---|
void |
addBuildAgent(BuildAgent buildAgent)
Record an agent matching ALL requirements
|
void |
addBuildAgents(Collection<BuildAgent> buildAgents)
Record a collection of agents matching ALL requirements
|
void |
addDedicatedNonMatchingBuildAgent(BuildAgent buildAgent)
Record build agent dedicated to the job/plan/project but not satisfying all requirements
|
void |
addDedicatedNonMatchingImage(ElasticImageConfiguration elasticImageConfiguration)
Record image configuration dedicated to the job/plan/project but not satisfying all requirements
|
void |
addImageMatch(ElasticImageConfiguration imageMatch)
Record an image that matches all requirements
|
void |
addImageToMatrix(String requirementKey,
ElasticImageConfiguration image)
Record an image matching a requirement.
|
void |
addRequirementWithNoAgentMatch(ImmutableRequirement requirement)
Record a requirement that does not have any matching agents.
|
void |
addRequirementWithNoImageMatch(ImmutableRequirement requirement)
Record a requirement that does not have any matching image.
|
SortedSet<BuildAgent> |
getBuildAgents()
Get a set of agents that match ALL requirements.
|
Collection<BuildAgent> |
getBuildAgents(String key) |
SortedSet<BuildAgent> |
getDedicatedNonMatchingBuildAgents() |
List<ElasticImageConfiguration> |
getDedicatedNonMatchingImages() |
Collection<ElasticImageConfiguration> |
getImageFromMatrix(String requirementKey) |
List<ElasticImageConfiguration> |
getImageMatches()
Get a set of elastic images that match ALL requirements.
|
Collection<BuildAgent> |
getOnlineEnabledBuildAgents()
Get a set of agents that match ALL requirements AND are currently enabled and online.
|
int |
getRequirementCount() |
Set<ImmutableRequirement> |
getRequirementsWithNoMatches()
Retrieve a list of all requirements which were not matched by any agent or image.
|
boolean |
isElasticBambooEnabled()
Check if elastic support is enabled
|
void |
put(String key,
BuildAgent value)
Record an agent matching a requirement.
|
void |
setElasticBambooEnabled(boolean elasticBambooEnabled)
Mark whether elastic support is enabled or not
|
void |
setRequirementCount(int requirementCount) |
public void put(@NotNull String key, @NotNull BuildAgent value)
ExecutableAgentsMatrix
put
in interface ExecutableAgentsMatrix
key
- of requirement matchedvalue
- that matches@Nullable public Collection<BuildAgent> getBuildAgents(@NotNull String key)
getBuildAgents
in interface ExecutableAgentsMatrix
key
- of requirement@NotNull public SortedSet<BuildAgent> getBuildAgents()
ExecutableAgentsMatrix
getBuildAgents
in interface ExecutableAgentsMatrix
@NotNull public Collection<BuildAgent> getOnlineEnabledBuildAgents()
ExecutableAgentsMatrix
getOnlineEnabledBuildAgents
in interface ExecutableAgentsMatrix
public void addBuildAgent(@NotNull BuildAgent buildAgent)
ExecutableAgentsMatrix
addBuildAgent
in interface ExecutableAgentsMatrix
buildAgent
- that matchespublic void addBuildAgents(@NotNull Collection<BuildAgent> buildAgents)
ExecutableAgentsMatrix
addBuildAgents
in interface ExecutableAgentsMatrix
buildAgents
- that matchpublic void addRequirementWithNoAgentMatch(@NotNull ImmutableRequirement requirement)
ExecutableAgentsMatrix
addRequirementWithNoAgentMatch
in interface ExecutableAgentsMatrix
requirement
- that didn't have a matchpublic void addRequirementWithNoImageMatch(@NotNull ImmutableRequirement requirement)
ExecutableAgentsMatrix
addRequirementWithNoImageMatch
in interface ExecutableAgentsMatrix
requirement
- that didn't have a match@NotNull public Set<ImmutableRequirement> getRequirementsWithNoMatches()
ExecutableAgentsMatrix
getRequirementsWithNoMatches
in interface ExecutableAgentsMatrix
public void setElasticBambooEnabled(boolean elasticBambooEnabled)
ExecutableAgentsMatrix
setElasticBambooEnabled
in interface ExecutableAgentsMatrix
elasticBambooEnabled
- whether elastic bamboo is enabledpublic boolean isElasticBambooEnabled()
ExecutableAgentsMatrix
isElasticBambooEnabled
in interface ExecutableAgentsMatrix
public int getRequirementCount()
getRequirementCount
in interface ExecutableAgentsMatrix
public void setRequirementCount(int requirementCount)
setRequirementCount
in interface ExecutableAgentsMatrix
requirementCount
- How many requirements were used to generate this matrix@NotNull public List<ElasticImageConfiguration> getImageMatches()
ExecutableAgentsMatrix
getImageMatches
in interface ExecutableAgentsMatrix
public void addImageMatch(@NotNull ElasticImageConfiguration imageMatch)
ExecutableAgentsMatrix
addImageMatch
in interface ExecutableAgentsMatrix
imageMatch
- image that matches@Nullable public Collection<ElasticImageConfiguration> getImageFromMatrix(@NotNull String requirementKey)
getImageFromMatrix
in interface ExecutableAgentsMatrix
requirementKey
- of requirementpublic void addImageToMatrix(@NotNull String requirementKey, @NotNull ElasticImageConfiguration image)
ExecutableAgentsMatrix
addImageToMatrix
in interface ExecutableAgentsMatrix
requirementKey
- for requirement that matchesimage
- that matchespublic void addDedicatedNonMatchingImage(@NotNull ElasticImageConfiguration elasticImageConfiguration)
ExecutableAgentsMatrix
addDedicatedNonMatchingImage
in interface ExecutableAgentsMatrix
public void addDedicatedNonMatchingBuildAgent(@NotNull BuildAgent buildAgent)
ExecutableAgentsMatrix
addDedicatedNonMatchingBuildAgent
in interface ExecutableAgentsMatrix
@NotNull public SortedSet<BuildAgent> getDedicatedNonMatchingBuildAgents()
getDedicatedNonMatchingBuildAgents
in interface ExecutableAgentsMatrix
@NotNull public List<ElasticImageConfiguration> getDedicatedNonMatchingImages()
getDedicatedNonMatchingImages
in interface ExecutableAgentsMatrix
Copyright © 2021 Atlassian Software Systems Pty Ltd. All rights reserved.