com.atlassian.bamboo.build
Class CurrentlyBuildingContainer

java.lang.Object
  extended by com.atlassian.bamboo.build.CurrentlyBuildingContainer
All Implemented Interfaces:
org.springframework.beans.factory.InitializingBean

@ThreadSafe
public class CurrentlyBuildingContainer
extends java.lang.Object
implements org.springframework.beans.factory.InitializingBean

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. This bean registers itself as event listener via afterPropertiesSet() method.


Constructor Summary
CurrentlyBuildingContainer(com.atlassian.event.api.EventPublisher eventPublisher)
           
 
Method Summary
 void afterPropertiesSet()
           
 CurrentlyBuilding getCurrentlyBuilding(long agentId)
           
 CurrentlyBuilding getCurrentlyBuildingByBuildResultKey(java.lang.String buildResultKey)
          Deprecated. since 5.0 use $getCurrentlyBuildingByResultKey(com.atlassian.bamboo.ResultKey)
 java.util.List<CurrentlyBuilding> getCurrentlyBuildingByKey(Key key)
          Immutable list of currently building by plan.
 java.util.List<CurrentlyBuilding> getCurrentlyBuildingByPlanKey(java.lang.String planKey)
          Deprecated. since 5.0 use $getCurrentlyBuildingByKey(Key)
 CurrentlyBuilding getCurrentlyBuildingByResultKey(ResultKey resultKey)
           
 java.util.List<CurrentlyBuilding> getCurrentlyExecutingBuilds()
          A List of the currently building things.
 int numberOfCurrentlyBuildingForKey(Key key)
           
 int numberOfCurrentlyBuildingForPlanKey(java.lang.String planKey)
          Deprecated. since 5.0 use $numberOfCurrentlyBuildingForKey(com.atlassian.bamboo.Key)
 void onAgentAssignedTimingPoint(BuildTimingPoints.AgentAssigned event)
           
 CurrentlyBuilding removeCurrentlyBuilding(ResultKey resultKey)
           
 CurrentlyBuilding removeCurrentlyBuilding(java.lang.String buildResultKey)
          Deprecated. 
 CurrentlyBuilding setCurrentlyBuilding(BuildContext buildContext, CurrentlyBuilding currentlyBuilding, java.util.Collection<BuildAgent> executableAgents, java.util.Collection<ElasticImageConfiguration> executableImages, boolean executableAgentInfoInitialized)
           
 CurrentlyBuilding startBuildingOnAgent(PlanResultKey planResultKey, 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(com.atlassian.event.api.EventPublisher eventPublisher)
Method Detail

afterPropertiesSet

public void afterPropertiesSet()
                        throws java.lang.Exception
Specified by:
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
Throws:
java.lang.Exception

onAgentAssignedTimingPoint

@EventListener
public void onAgentAssignedTimingPoint(@NotNull
                                                     BuildTimingPoints.AgentAssigned event)

getCurrentlyBuildingByPlanKey

@NotNull
@Deprecated
public java.util.List<CurrentlyBuilding> getCurrentlyBuildingByPlanKey(java.lang.String planKey)
Deprecated. since 5.0 use $getCurrentlyBuildingByKey(Key)

Immutable list of currently building by plan.


getCurrentlyBuildingByKey

public java.util.List<CurrentlyBuilding> getCurrentlyBuildingByKey(Key key)
Immutable list of currently building by plan.


numberOfCurrentlyBuildingForPlanKey

@Deprecated
public int numberOfCurrentlyBuildingForPlanKey(java.lang.String planKey)
Deprecated. since 5.0 use $numberOfCurrentlyBuildingForKey(com.atlassian.bamboo.Key)


numberOfCurrentlyBuildingForKey

public int numberOfCurrentlyBuildingForKey(Key key)

getCurrentlyExecutingBuilds

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


getCurrentlyBuildingByBuildResultKey

@Deprecated
@Nullable
public CurrentlyBuilding getCurrentlyBuildingByBuildResultKey(@NotNull
                                                                                  java.lang.String buildResultKey)
Deprecated. since 5.0 use $getCurrentlyBuildingByResultKey(com.atlassian.bamboo.ResultKey)


getCurrentlyBuildingByResultKey

@Nullable
public CurrentlyBuilding getCurrentlyBuildingByResultKey(@NotNull
                                                                  ResultKey resultKey)

getCurrentlyBuilding

@Nullable
public CurrentlyBuilding getCurrentlyBuilding(long agentId)

setCurrentlyBuilding

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

startBuildingOnAgent

@NotNull
public CurrentlyBuilding startBuildingOnAgent(@NotNull
                                                      PlanResultKey planResultKey,
                                                      long agentId)

removeCurrentlyBuilding

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


removeCurrentlyBuilding

@Nullable
public CurrentlyBuilding removeCurrentlyBuilding(@NotNull
                                                          ResultKey resultKey)


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