com.atlassian.bamboo.buildqueue.manager
Class AgentStateCache

java.lang.Object
  extended by com.atlassian.bamboo.buildqueue.manager.AgentStateCache

@ThreadSafe
public class AgentStateCache
extends java.lang.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
 java.util.Collection<BuildAgent> getActiveAndEnabledAgents()
           
 BuildAgent getAgent(long agentId)
           
 java.util.List<BuildAgent> getAllAgents()
           
 java.util.List<LocalBuildAgent> getAllLocalAgents()
           
 java.util.List<BuildAgent> getAllRemoteAgents(boolean onlineOnly)
           
 java.util.Collection<BuildAgent> getBusyBuildAgents()
           
 LocalBuildAgent getLocalAgent(long id)
           
 java.util.List<BuildAgent> getNonElasticAgents()
           
 java.util.List<BuildAgent> getOnlineElasticAgents()
           
 void initialiseAgents(java.util.Set<LocalBuildAgent> localAgents, java.util.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
                             java.util.Set<LocalBuildAgent> localAgents,
                             @Nullable
                             java.util.Set<BuildAgent> remoteAgents)

updateAgentInCache

@Nullable
public BuildAgent updateAgentInCache(PipelineDefinition definition)

removeFromCache

public void removeFromCache(@NotNull
                            BuildAgent agent)

getAllLocalAgents

public java.util.List<LocalBuildAgent> getAllLocalAgents()

getOnlineElasticAgents

public java.util.List<BuildAgent> getOnlineElasticAgents()

getAllRemoteAgents

public java.util.List<BuildAgent> getAllRemoteAgents(boolean onlineOnly)

getAllAgents

public java.util.List<BuildAgent> getAllAgents()

getNonElasticAgents

public java.util.List<BuildAgent> getNonElasticAgents()

getBusyBuildAgents

public java.util.Collection<BuildAgent> getBusyBuildAgents()

getActiveAndEnabledAgents

public java.util.Collection<BuildAgent> getActiveAndEnabledAgents()

getLocalAgent

public LocalBuildAgent getLocalAgent(long id)

getAgent

public BuildAgent getAgent(long agentId)


Copyright © 2013 Atlassian Software Systems Pty Ltd. All Rights Reserved.