|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.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 ExecutableAgentsMatrixkey - of requirement matchedvalue - that matches
@Nullable
public Collection<BuildAgent> getBuildAgents(@NotNull
String key)
getBuildAgents in interface ExecutableAgentsMatrixkey - 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 ExecutableAgentsMatrixbuildAgent - that matches
public void addBuildAgents(@NotNull
Collection<BuildAgent> buildAgents)
ExecutableAgentsMatrix
addBuildAgents in interface ExecutableAgentsMatrixbuildAgents - that match
public void addRequirementWithNoAgentMatch(@NotNull
Requirement requirement)
ExecutableAgentsMatrix
addRequirementWithNoAgentMatch in interface ExecutableAgentsMatrixrequirement - that didn't have a match
public void addRequirementWithNoImageMatch(@NotNull
Requirement requirement)
ExecutableAgentsMatrix
addRequirementWithNoImageMatch in interface ExecutableAgentsMatrixrequirement - that didn't have a match@NotNull public Set<Requirement> getRequirementsWithNoMatches()
ExecutableAgentsMatrix
getRequirementsWithNoMatches in interface ExecutableAgentsMatrixpublic void setElasticBambooEnabled(boolean elasticBambooEnabled)
ExecutableAgentsMatrix
setElasticBambooEnabled in interface ExecutableAgentsMatrixelasticBambooEnabled - whether elastic bamboo is enabledpublic boolean isElasticBambooEnabled()
ExecutableAgentsMatrix
isElasticBambooEnabled in interface ExecutableAgentsMatrixpublic int getRequirementCount()
getRequirementCount in interface ExecutableAgentsMatrixpublic void setRequirementCount(int requirementCount)
setRequirementCount in interface ExecutableAgentsMatrixrequirementCount - 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 ExecutableAgentsMatriximageMatch - image that matches
@Nullable
public Collection<ElasticImageConfiguration> getImageFromMatrix(@NotNull
String requirementKey)
getImageFromMatrix in interface ExecutableAgentsMatrixrequirementKey - of requirement
public void addImageToMatrix(@NotNull
String requirementKey,
@NotNull
ElasticImageConfiguration image)
ExecutableAgentsMatrix
addImageToMatrix in interface ExecutableAgentsMatrixrequirementKey - for requirement that matchesimage - that matches
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||