@ThreadSafe public class CurrentlyBuildingContainer extends Object
CurrentlyBuilding
objects keyed by plan key and buildAgentId.
This bean registers itself as event listener.
Constructor and Description |
---|
CurrentlyBuildingContainer(AgentManager agentManager,
com.atlassian.event.api.EventPublisher eventPublisher,
XStreamFactory xStreamFactory) |
Modifier and Type | Method and Description |
---|---|
CurrentlyBuilding |
getCurrentlyBuilding(long agentId) |
List<CurrentlyBuilding> |
getCurrentlyBuildingByKey(Key key)
Immutable list of currently building by plan.
|
CurrentlyBuilding |
getCurrentlyBuildingByResultKey(ResultKey resultKey) |
Iterable<CurrentlyBuilding> |
getCurrentlyExecuting() |
int |
numberOfCurrentlyBuildingForKey(Key key) |
void |
onAgentAssignedTimingPoint(OutOfBandBuildTimingPoints.OutOfBandAgentAssigned event) |
CurrentlyBuilding |
removeCurrentlyBuilding(ResultKey resultKey) |
Set<ResultKey> |
restoreState(Set<PlanResultKey> pendingBuildKeys) |
protected void |
saveState(CurrentlyBuilding currentlyBuilding,
boolean saveEvenIfFileExists) |
CurrentlyBuilding |
setCurrentlyBuilding(BuildContext buildContext,
CurrentlyBuilding currentlyBuilding,
Collection<BuildAgent> executableAgents,
Collection<ElasticImageConfiguration> executableImages) |
public CurrentlyBuildingContainer(AgentManager agentManager, com.atlassian.event.api.EventPublisher eventPublisher, XStreamFactory xStreamFactory)
@EventListener public void onAgentAssignedTimingPoint(@NotNull OutOfBandBuildTimingPoints.OutOfBandAgentAssigned event)
public List<CurrentlyBuilding> getCurrentlyBuildingByKey(Key key)
public int numberOfCurrentlyBuildingForKey(Key key)
@NotNull public Iterable<CurrentlyBuilding> getCurrentlyExecuting()
@Nullable public CurrentlyBuilding getCurrentlyBuildingByResultKey(@NotNull ResultKey resultKey)
@Nullable public CurrentlyBuilding getCurrentlyBuilding(long agentId)
@NotNull public CurrentlyBuilding setCurrentlyBuilding(@NotNull BuildContext buildContext, @NotNull CurrentlyBuilding currentlyBuilding, Collection<BuildAgent> executableAgents, Collection<ElasticImageConfiguration> executableImages)
@Nullable public CurrentlyBuilding removeCurrentlyBuilding(@NotNull ResultKey resultKey)
public Set<ResultKey> restoreState(Set<PlanResultKey> pendingBuildKeys)
pendingBuildKeys
- protected void saveState(CurrentlyBuilding currentlyBuilding, boolean saveEvenIfFileExists)
Copyright © 2020 Atlassian Software Systems Pty Ltd. All rights reserved.