public class FifoExecutableOrderProvider extends Object implements ExecutableOrderProvider
Constructor and Description |
---|
FifoExecutableOrderProvider() |
Modifier and Type | Method and Description |
---|---|
@Nullable ResultKey |
findExecutableForAgent(long agentId,
@NotNull Collection<QueueOfExecutables.ExecutableData> executableData)
From the list of executables, returns the executable that should be picked up by the agent.
|
@NotNull Collection<BuildQueueManager.QueuedResultKey> |
getOrderedExecutables()
Returns a full list of result keys of queued executables ordered with a global ordering.
|
void |
onDequeue(@NotNull CommonContext context)
Called when a context is removed from queue.
|
void |
onEnqueue(@NotNull Iterable<CommonContext> contexts)
Will not be called concurrently.
|
void |
removeByKey(ResultKey resultKey)
Remove items with a
ResultKey . |
boolean |
reorder(ResultKey resultKey,
int index)
Called when an executable with a specific result key should be moved to a specific index in the queue.
|
public void onEnqueue(@NotNull @NotNull Iterable<CommonContext> contexts)
ExecutableOrderProvider
onEnqueue
in interface ExecutableOrderProvider
public void onDequeue(@NotNull @NotNull CommonContext context)
ExecutableOrderProvider
onDequeue
in interface ExecutableOrderProvider
@Nullable public @Nullable ResultKey findExecutableForAgent(long agentId, @NotNull @NotNull Collection<QueueOfExecutables.ExecutableData> executableData)
ExecutableOrderProvider
findExecutableForAgent
in interface ExecutableOrderProvider
@NotNull public @NotNull Collection<BuildQueueManager.QueuedResultKey> getOrderedExecutables()
ExecutableOrderProvider
getOrderedExecutables
in interface ExecutableOrderProvider
public boolean reorder(ResultKey resultKey, int index)
ExecutableOrderProvider
reorder
in interface ExecutableOrderProvider
public void removeByKey(ResultKey resultKey)
ExecutableOrderProvider
ResultKey
. Called if Bamboo detects that order provider contains references to items that are no longer accessible.removeByKey
in interface ExecutableOrderProvider
Copyright © 2022 Atlassian Software Systems Pty Ltd. All rights reserved.