@Internal @ThreadSafe public interface BuildQueueManager extends AgentQueueAccessor
| Modifier and Type | Interface and Description |
|---|---|
static class |
BuildQueueManager.QueuedResultKey |
static class |
BuildQueueManager.QueueItemView<T> |
AgentQueueAccessor.QueueAccessResult| Modifier and Type | Field and Description |
|---|---|
static String |
DISABLE_BUILD_SYSTEM_PROPERTY |
| Modifier and Type | Method and Description |
|---|---|
void |
addToQueue(@NotNull CommonContext context)
Attempts to add the build to a queue.
|
@Nullable Set<Long> |
getExecutorsForQueuedExecutable(@NotNull ResultKey resultKey) |
@Nullable Collection<ElasticImageConfiguration> |
getImagesForQueuedExecutable(@NotNull ResultKey resultKey) |
@NotNull Iterable<BuildQueueManager.QueuedResultKey> |
getQueuedExecutables() |
@NotNull BuildQueuePosition |
getQueuePosition(@NotNull ResultKey resultKey)
Returns information on position of plan result in the queue.
|
void |
invalidateExecutables(@NotNull BuildAgent buildAgent)
Updates all agent-executable mappings for a given agent.
|
void |
invalidateExecutors(@NotNull Key planKey) |
void |
invalidateExecutors(@NotNull String reason) |
@Nullable BuildQueueManager.QueueItemView<CommonContext> |
peekContext(@NotNull ResultKey resultKey)
Returns a queued CommonContext for given resultKey.
|
void |
removeBuildFromQueue(@NotNull ResultKey resultKey)
Removes the
CommonContext associated with the resultKey to be removed from the queue. |
boolean |
reorderInQueue(ResultKey resultKey,
int index)
Reorders the build queue.
|
void |
restoreState(Set<ResultKey> resultsToRestore)
Restore state after server restart.
|
takeBuildContext, takeContextstatic final String DISABLE_BUILD_SYSTEM_PROPERTY
void addToQueue(@NotNull
@NotNull CommonContext context)
A lock on the build is obtained from the BuildExecutionManager.
context - {@link - IllegalStateException} if the build is already queuedvoid removeBuildFromQueue(@NotNull
@NotNull ResultKey resultKey)
CommonContext associated with the resultKey to be removed from the queue.
The lock on the build is not released. The caller should call com.atlassian.bamboo.build.BuildExecutionManager#finishBuild(PlanResultKey) to
release this lock when ready.
resultKey - @Nullable @Nullable BuildQueueManager.QueueItemView<CommonContext> peekContext(@NotNull @NotNull ResultKey resultKey)
resultKey - boolean reorderInQueue(ResultKey resultKey, int index)
CommonContext associated with the resultKey is moved to new position in the queue
indicated by the zero-based index parameter. If index is < 0 or >= size of queue then CommonContext is
positioned at the beginning or at the end of the queue respectively.resultKey - Result key of the build that shall be repositioned in the queue.index - New position of a CommonContext associated with the planKey in the queue.@NotNull @NotNull BuildQueuePosition getQueuePosition(@NotNull @NotNull ResultKey resultKey)
resultKey - identifies plan resultvoid invalidateExecutors(@NotNull
@NotNull String reason)
void invalidateExecutors(@NotNull
@NotNull Key planKey)
void invalidateExecutables(@NotNull
@NotNull BuildAgent buildAgent)
@NotNull @NotNull Iterable<BuildQueueManager.QueuedResultKey> getQueuedExecutables()
@Nullable @Nullable Collection<ElasticImageConfiguration> getImagesForQueuedExecutable(@NotNull @NotNull ResultKey resultKey)
@Nullable @Nullable Set<Long> getExecutorsForQueuedExecutable(@NotNull @NotNull ResultKey resultKey)
Copyright © 2023 Atlassian Software Systems Pty Ltd. All rights reserved.