Class AgentStateCache
- java.lang.Object
-
- com.atlassian.bamboo.buildqueue.manager.AgentStateCache
-
@ThreadSafe public class AgentStateCache extends Object
Class to encapsulate the current state of the agents that's around Bamboo at the moment.Read methods are internally consistent in that they will be accurate for a particular time snapshot
- Since:
- v4.3
-
-
Constructor Summary
Constructors Constructor Description AgentStateCache()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Collection<BuildAgent>getActiveAndEnabledAgents()BuildAgentgetAgent(long agentId)List<BuildAgent>getAllAgents()List<LocalBuildAgent>getAllLocalAgents()List<BuildAgent>getAllRemoteAgents(boolean onlineOnly)List<BuildAgent>getAllStandardAgents()Collection<BuildAgent>getBusyBuildAgents()Collection<BuildAgent>getElasticActiveAndEnabledAgents()Collection<LocalBuildAgent>getLocalActiveAndEnabledAgents()LocalBuildAgentgetLocalAgent(long id)List<BuildAgent>getNonElasticAgents()List<BuildAgent>getOnlineElasticAgents()List<BuildAgent>getOnlineEphemeralAgents()Collection<BuildAgent>getRemoteActiveAndEnabledAgents()voidinitialiseAgents(@NotNull Set<LocalBuildAgent> localAgents, @NotNull Set<BuildAgent> remoteAgents)voidremoveFromCache(long id)voidremoveFromCache(@NotNull BuildAgent agent)@NotNull BuildAgentupdateAgentInCache(PipelineDefinition definition)
-
-
-
Method Detail
-
initialiseAgents
public void initialiseAgents(@NotNull @NotNull Set<LocalBuildAgent> localAgents, @NotNull @NotNull Set<BuildAgent> remoteAgents)
-
updateAgentInCache
@NotNull public @NotNull BuildAgent updateAgentInCache(PipelineDefinition definition)
-
removeFromCache
public void removeFromCache(long id)
-
removeFromCache
public void removeFromCache(@NotNull @NotNull BuildAgent agent)
-
getAllLocalAgents
public List<LocalBuildAgent> getAllLocalAgents()
-
getOnlineElasticAgents
public List<BuildAgent> getOnlineElasticAgents()
-
getOnlineEphemeralAgents
public List<BuildAgent> getOnlineEphemeralAgents()
-
getAllRemoteAgents
public List<BuildAgent> getAllRemoteAgents(boolean onlineOnly)
-
getAllAgents
public List<BuildAgent> getAllAgents()
-
getNonElasticAgents
public List<BuildAgent> getNonElasticAgents()
-
getAllStandardAgents
public List<BuildAgent> getAllStandardAgents()
-
getBusyBuildAgents
public Collection<BuildAgent> getBusyBuildAgents()
-
getActiveAndEnabledAgents
public Collection<BuildAgent> getActiveAndEnabledAgents()
-
getRemoteActiveAndEnabledAgents
public Collection<BuildAgent> getRemoteActiveAndEnabledAgents()
-
getElasticActiveAndEnabledAgents
public Collection<BuildAgent> getElasticActiveAndEnabledAgents()
-
getLocalActiveAndEnabledAgents
public Collection<LocalBuildAgent> getLocalActiveAndEnabledAgents()
-
getLocalAgent
public LocalBuildAgent getLocalAgent(long id)
-
getAgent
public BuildAgent getAgent(long agentId)
-
-