com.atlassian.bamboo.buildqueue.manager
Class AgentStateCache

java.lang.Object
  extended by 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
AgentStateCache()
           
 
Method Summary
 Collection<BuildAgent> getActiveAndEnabledAgents()
           
 BuildAgent getAgent(long agentId)
           
 List<BuildAgent> getAllAgents()
           
 List<LocalBuildAgent> getAllLocalAgents()
           
 List<BuildAgent> getAllRemoteAgents(boolean onlineOnly)
           
 Collection<BuildAgent> getBusyBuildAgents()
           
 LocalBuildAgent getLocalAgent(long id)
           
 List<BuildAgent> getNonElasticAgents()
           
 List<BuildAgent> getOnlineElasticAgents()
           
 void initialiseAgents(Set<LocalBuildAgent> localAgents, Set<BuildAgent> remoteAgents)
           
 void removeFromCache(BuildAgent agent)
           
 BuildAgent updateAgentInCache(PipelineDefinition definition)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AgentStateCache

public AgentStateCache()
Method Detail

initialiseAgents

public void initialiseAgents(@Nullable
                             Set<LocalBuildAgent> localAgents,
                             @Nullable
                             Set<BuildAgent> remoteAgents)

updateAgentInCache

@NotNull
public BuildAgent updateAgentInCache(PipelineDefinition definition)

removeFromCache

public void removeFromCache(@NotNull
                            BuildAgent agent)

getAllLocalAgents

public List<LocalBuildAgent> getAllLocalAgents()

getOnlineElasticAgents

public List<BuildAgent> getOnlineElasticAgents()

getAllRemoteAgents

public List<BuildAgent> getAllRemoteAgents(boolean onlineOnly)

getAllAgents

public List<BuildAgent> getAllAgents()

getNonElasticAgents

public List<BuildAgent> getNonElasticAgents()

getBusyBuildAgents

public Collection<BuildAgent> getBusyBuildAgents()

getActiveAndEnabledAgents

public Collection<BuildAgent> getActiveAndEnabledAgents()

getLocalAgent

public LocalBuildAgent getLocalAgent(long id)

getAgent

public BuildAgent getAgent(long agentId)


Copyright © 2015 Atlassian Software Systems Pty Ltd. All rights reserved.