|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
@Internal @ThreadSafe public interface BuildQueueManager
This interface defines the work that the queue manager can do. Implementors must be threadsafe.
Nested Class Summary | |
---|---|
static class |
BuildQueueManager.QueuedResultKey
|
static class |
BuildQueueManager.QueueItemView<T>
|
Field Summary | |
---|---|
static String |
DISABLE_BUILD_SYSTEM_PROPERTY
|
Method Summary | |
---|---|
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. since 5.5 use QueueManagerUtils.removeFromQueue(BuildQueueManager, com.atlassian.bamboo.Key) |
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. |
Methods inherited from interface com.atlassian.bamboo.v2.build.queue.AgentQueueAccessor |
---|
takeBuildContext |
Field Detail |
---|
static final String DISABLE_BUILD_SYSTEM_PROPERTY
Method Detail |
---|
void addToQueue(@NotNull CommonContext context)
BuildQueuedEvent
is fired if queuing was successful and a BuildRejectedFromQueueEvent
iif rejected.
A lock on the build is obtained from the BuildExecutionManager
.
context
- @NotNullvoid removeBuildFromQueue(@NotNull ResultKey resultKey)
CommonContext
associated with the resultKey to be removed from the queue. A BuildDeQueuedEvent
is fired.
The lock on the build is not released. The caller should call BuildExecutionManager#finishProcess
to
release this lock when ready.
resultKey
- @Nullable BuildQueueManager.QueueItemView<CommonContext> peekContext(@NotNull ResultKey resultKey)
for your build queue viewing needs
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. A BuildDeQueuedEvent
is fired.
The lock on the build is not released. The caller should call BuildExecutionManager#finishProcess
to
release this lock when ready.
planKey
- @Deprecated void reorderBuildInQueue(String planKey, int index)
reorderInQueue(com.atlassian.bamboo.ResultKey, int)
instead
CommonContext
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)
buildResultKey
- prevBuildResultKey
- nextBuildResultKey
-
@NotNull BuildQueuePosition getQueuePosition(@NotNull ResultKey resultKey)
resultKey
- identifies plan result
void invalidateExecutors(@NotNull String reason)
void invalidateExecutors(@NotNull Key planKey)
@NotNull Iterable<BuildQueueManager.QueuedResultKey> getQueuedExecutables()
@NotNull @Deprecated com.google.common.collect.ImmutableList<CommonContext> getRecentBuildQueue()
getBuildQueue()
instead
CommonContext
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 for queue access
List
of CommonContext
. Changes to this List is not reflected in the queue.void restoreState(Set<ResultKey> resultsToRestore)
resultsToRestore
- keys of results that it makes sense to restore
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |