@Internal @ThreadSafe public interface BuildQueueManager extends AgentQueueAccessor
Modifier and Type | Interface and Description |
---|---|
static class |
BuildQueueManager.QueuedResultKey |
static class |
BuildQueueManager.QueueItemView<T> |
Modifier and Type | Field and Description |
---|---|
static String |
DISABLE_BUILD_SYSTEM_PROPERTY |
Modifier and Type | Method and Description |
---|---|
void |
addToQueue(CommonContext context)
Attempts to add the build to a queue.
|
Iterable<CommonContext> |
getBuildQueue()
Deprecated.
since 5.1
|
Iterable<BuildQueueManager.QueuedResultKey> |
getQueuedExecutables() |
BuildQueuePosition |
getQueuePosition(ResultKey resultKey)
Returns information on position of plan result in the queue.
|
com.google.common.collect.ImmutableList<CommonContext> |
getRecentBuildQueue()
Deprecated.
since 5.1 use
getBuildQueue() instead |
void |
invalidateExecutors(Key planKey) |
void |
invalidateExecutors(String reason) |
BuildQueueManager.QueueItemView<CommonContext> |
peekContext(ResultKey resultKey)
Returns a queued CommonContext for given resultKey.
|
void |
removeAllBuildsForPlanFromQueue(PlanKey planKey)
Deprecated.
|
void |
removeBuildFromQueue(ResultKey resultKey)
Removes the
CommonContext associated with the resultKey to be removed from the queue. |
void |
reorderBuildInQueue(String planKey,
int index)
Deprecated.
since 5.5 use
reorderInQueue(com.atlassian.bamboo.ResultKey, int) instead |
boolean |
reorderBuildInQueue(String buildResultKey,
String prevBuildResultKey,
String nextBuildResultKey)
Deprecated.
since 5.5 use
reorderInQueue(com.atlassian.bamboo.ResultKey, int) |
boolean |
reorderInQueue(ResultKey resultKey,
int index)
Reorders the build queue.
|
void |
restoreState(Set<ResultKey> resultsToRestore)
Restore state after server restart.
|
takeBuildContext
static final String DISABLE_BUILD_SYSTEM_PROPERTY
void addToQueue(@NotNull CommonContext context)
A lock on the build is obtained from the BuildExecutionManager
.
context
- void removeBuildFromQueue(@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 BuildExecutionManager.finishBuild(PlanResultKey)
to
release this lock when ready.
resultKey
- @Nullable BuildQueueManager.QueueItemView<CommonContext> peekContext(@NotNull ResultKey resultKey)
resultKey
- @Deprecated void removeAllBuildsForPlanFromQueue(@NotNull PlanKey planKey)
QueueManagerUtils.removeFromQueue(BuildQueueManager, com.atlassian.bamboo.Key)
CommonContext
associated with the planKey to be removed from the queue.
The lock on the build is not released. The caller should call BuildExecutionManager.finishBuild(PlanResultKey)
to
release this lock when ready.
planKey
- @Deprecated void reorderBuildInQueue(String planKey, int index)
reorderInQueue(com.atlassian.bamboo.ResultKey, int)
insteadCommonContext
associated with the planKey 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.planKey
- Plan key of the build that shall be repositioned in the queue.index
- New position of a CommonContext
associated with the planKey in the queue.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.@Deprecated @TestOnly boolean reorderBuildInQueue(@NotNull String buildResultKey, @Nullable String prevBuildResultKey, @Nullable String nextBuildResultKey)
reorderInQueue(com.atlassian.bamboo.ResultKey, int)
You must specify buildResultKey and either prevBuildResultKey or nextBuildResultKey (or both).
buildResultKey
- prevBuildResultKey
- nextBuildResultKey
- @NotNull BuildQueuePosition getQueuePosition(@NotNull ResultKey resultKey)
resultKey
- identifies plan resultvoid invalidateExecutors(@NotNull String reason)
void invalidateExecutors(@NotNull Key planKey)
@NotNull Iterable<BuildQueueManager.QueuedResultKey> getQueuedExecutables()
@NotNull @Deprecated com.google.common.collect.ImmutableList<CommonContext> getRecentBuildQueue()
getBuildQueue()
insteadCommonContext
objects currently in the build queue. If there are any pending queue
operations, this method will return the latest known queue state.List
of CommonContext
. Changes to this List is not reflected in the queue.@NotNull @Deprecated Iterable<CommonContext> getBuildQueue()
CommonContext
objects currently in the build queue. If there are any pending queue
operations, this method will return the latest known queue state.
Consider using com.atlassian.bamboo.v2.build.queue.QueueManagerView for queue access}List
of CommonContext
. Changes to this List is not reflected in the queue.Copyright © 2016 Atlassian Software Systems Pty Ltd. All rights reserved.