Package com.atlassian.bamboo.build
Class CurrentlyBuildingContainer
java.lang.Object
com.atlassian.bamboo.build.CurrentlyBuildingContainer
A class that allows thread safe maps of
CurrentlyBuilding objects keyed by plan key and buildAgentId.
This bean registers itself as event listener.
-
Constructor Summary
ConstructorsConstructorDescriptionCurrentlyBuildingContainer(AgentManager agentManager, com.atlassian.event.api.EventPublisher eventPublisher, XStreamFactory xStreamFactory) -
Method Summary
Modifier and TypeMethodDescriptionvoiddetachBuildFromAgent(long agentId) @Nullable CurrentlyBuildinggetCurrentlyBuilding(long agentId) Immutable list of currently building by plan.@Nullable CurrentlyBuildinggetCurrentlyBuildingByResultKey(@NotNull ResultKey resultKey) @NotNull Iterable<CurrentlyBuilding> intvoid@Nullable CurrentlyBuildingremoveCurrentlyBuilding(@NotNull ResultKey resultKey) restoreState(Set<PlanResultKey> pendingBuildKeys, ExecutorService executorService) protected voidsaveState(CurrentlyBuilding currentlyBuilding, boolean saveEvenIfFileExists) @NotNull CurrentlyBuildingsetCurrentlyBuilding(@NotNull BuildContext buildContext, @NotNull CurrentlyBuilding currentlyBuilding, Collection<BuildAgent> executableAgents, Collection<ElasticImageConfiguration> executableImages) @Nullable CurrentlyBuildingstartBuildingOnAgent(@NotNull PlanResultKey planResultKey, long agentId, Date sentToAgentTimestamp)
-
Constructor Details
-
CurrentlyBuildingContainer
public CurrentlyBuildingContainer(AgentManager agentManager, com.atlassian.event.api.EventPublisher eventPublisher, XStreamFactory xStreamFactory)
-
-
Method Details
-
onSentToAgentTimingPoint
@EventListener public void onSentToAgentTimingPoint(@NotNull OutOfBandDeploymentTimingPoints.SentToAgent event) -
getCurrentlyBuildingByKey
Immutable list of currently building by plan. -
numberOfCurrentlyBuildingForKey
-
getCurrentlyExecuting
- Returns:
- currently building things.
-
getCurrentlyBuildingByResultKey
@Nullable public @Nullable CurrentlyBuilding getCurrentlyBuildingByResultKey(@NotNull @NotNull ResultKey resultKey) -
getCurrentlyBuilding
-
setCurrentlyBuilding
@NotNull public @NotNull CurrentlyBuilding setCurrentlyBuilding(@NotNull @NotNull BuildContext buildContext, @NotNull @NotNull CurrentlyBuilding currentlyBuilding, Collection<BuildAgent> executableAgents, Collection<ElasticImageConfiguration> executableImages) -
startBuildingOnAgent
@Nullable public @Nullable CurrentlyBuilding startBuildingOnAgent(@NotNull @NotNull PlanResultKey planResultKey, long agentId, Date sentToAgentTimestamp) -
detachBuildFromAgent
public void detachBuildFromAgent(long agentId) -
removeCurrentlyBuilding
@Nullable public @Nullable CurrentlyBuilding removeCurrentlyBuilding(@NotNull @NotNull ResultKey resultKey) -
restoreState
public Set<ResultKey> restoreState(Set<PlanResultKey> pendingBuildKeys, ExecutorService executorService) throws ExecutionException, InterruptedException - Parameters:
pendingBuildKeys-- Returns:
- keys of restored results
- Throws:
ExecutionExceptionInterruptedException
-
saveState
-