|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.bamboo.buildqueue.manager.ExecutableAgentsMatrixImpl
public class ExecutableAgentsMatrixImpl
A simple holder object that stores information about the executable agents on a per requirement basis
Constructor Summary | |
---|---|
ExecutableAgentsMatrixImpl()
|
Method Summary | |
---|---|
void |
addBuildAgent(BuildAgent buildAgent)
Record an agent matching ALL requirements |
void |
addBuildAgents(Collection<BuildAgent> buildAgents)
Record a collection of agents matching 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(Requirement requirement)
Record a requirement that does not have any matching agents. |
void |
addRequirementWithNoImageMatch(Requirement 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)
|
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<Requirement> |
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)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ExecutableAgentsMatrixImpl()
Method Detail |
---|
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 Requirement requirement)
ExecutableAgentsMatrix
addRequirementWithNoAgentMatch
in interface ExecutableAgentsMatrix
requirement
- that didn't have a matchpublic void addRequirementWithNoImageMatch(@NotNull Requirement requirement)
ExecutableAgentsMatrix
addRequirementWithNoImageMatch
in interface ExecutableAgentsMatrix
requirement
- that didn't have a match@NotNull public Set<Requirement> 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 requirement
public void addImageToMatrix(@NotNull String requirementKey, @NotNull ElasticImageConfiguration image)
ExecutableAgentsMatrix
addImageToMatrix
in interface ExecutableAgentsMatrix
requirementKey
- for requirement that matchesimage
- that matches
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |