com.atlassian.bamboo.build
Class CurrentlyBuildingContainer

java.lang.Object
  extended by com.atlassian.bamboo.build.CurrentlyBuildingContainer

@ThreadSafe
public class CurrentlyBuildingContainer
extends java.lang.Object

A class that allows thread safe maps of CurrentlyBuilding objects keyed by plan key and buildAgentId.

This is implemented with a copy-on-write strategy that allows wait-free reads and lock-free updates.


Constructor Summary
CurrentlyBuildingContainer()
           
 
Method Summary
 CurrentlyBuilding getCurrentlyBuilding(java.lang.Long agentId)
           
 CurrentlyBuilding getCurrentlyBuildingByBuildResultKey(java.lang.String buildResultKey)
           
 java.util.List<CurrentlyBuilding> getCurrentlyBuildingByPlanKey(java.lang.String planKey)
          Immutable list of currently building by plan.
 java.util.List<CurrentlyBuilding> getCurrentlyExecutingBuilds()
          A List of the currently building things.
 int numberOfCurrentlyBuildingForPlanKey(java.lang.String planKey)
           
 CurrentlyBuilding removeCurrentlyBuilding(java.lang.String buildResultKey)
           
 CurrentlyBuilding setCurrentlyBuilding(BuildContext buildContext, CurrentlyBuilding currentlyBuilding, java.util.Collection<BuildAgent> executableAgents, java.util.Collection<ElasticImageConfiguration> executableImages, boolean executableAgentInfoInitialized)
           
 CurrentlyBuilding startBuildingOnAgent(BuildContext buildContext, java.lang.Long agentId)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CurrentlyBuildingContainer

public CurrentlyBuildingContainer()
Method Detail

getCurrentlyBuildingByPlanKey

public java.util.List<CurrentlyBuilding> getCurrentlyBuildingByPlanKey(java.lang.String planKey)
Immutable list of currently building by plan.


numberOfCurrentlyBuildingForPlanKey

public int numberOfCurrentlyBuildingForPlanKey(java.lang.String planKey)

getCurrentlyExecutingBuilds

public java.util.List<CurrentlyBuilding> getCurrentlyExecutingBuilds()
A List of the currently building things.


getCurrentlyBuildingByBuildResultKey

public CurrentlyBuilding getCurrentlyBuildingByBuildResultKey(@NotNull
                                                              java.lang.String buildResultKey)

getCurrentlyBuilding

public CurrentlyBuilding getCurrentlyBuilding(java.lang.Long agentId)

setCurrentlyBuilding

public CurrentlyBuilding setCurrentlyBuilding(@NotNull
                                              BuildContext buildContext,
                                              @NotNull
                                              CurrentlyBuilding currentlyBuilding,
                                              java.util.Collection<BuildAgent> executableAgents,
                                              java.util.Collection<ElasticImageConfiguration> executableImages,
                                              boolean executableAgentInfoInitialized)

startBuildingOnAgent

public CurrentlyBuilding startBuildingOnAgent(@NotNull
                                              BuildContext buildContext,
                                              @NotNull
                                              java.lang.Long agentId)

removeCurrentlyBuilding

@Nullable
public CurrentlyBuilding removeCurrentlyBuilding(@NotNull
                                                          java.lang.String buildResultKey)


Copyright © 2011 Atlassian. All Rights Reserved.