public abstract class AbstractQueueOfExecutables extends Object implements QueueOfExecutables
QueueOfExecutables.ExecutableData| Modifier | Constructor and Description |
|---|---|
protected |
AbstractQueueOfExecutables(ExecutorCalculator executorCalculator,
CommonContextMap map) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
enqueue(CommonContext context,
MinimalRequirementSet requirements)
Adds a new executable to store.
|
com.google.common.collect.ImmutableList<QueueOfExecutables.ExecutableData> |
executablesForAgent(long agentId)
Returns executables available for an agent.
|
CommonContext |
get(ResultKey resultKey)
Retrieves an executable with given key from storage.
|
Set<Long> |
getExecutorsForExecutable(ResultKey resultKey)
Returns the executors currently considered to be eligible for building resultKey.
|
Collection<ElasticImageConfiguration> |
getImagesForExecutable(ResultKey resultKey)
Returns the images currently considered to be eligible for building resultKey.
|
CommonContext |
inflight(ResultKey resultKey)
Called when a given executable is en route to agent.
|
void |
recalculateExecutables(BuildAgent agent)
Updates all agent-executable mappings for a given agent.
|
void |
recalculateExecutors()
Recalculates executors for all executables - until then, any information about executor-executable
mapping should be considered to be invalid.
|
void |
recalculateExecutors(Set<Key> keys)
Recalculates executors for a given plan - until then, any information about executor-executable
mapping for this plan should be considered to be invalid.
|
CommonContext |
remove(ResultKey resultKey)
Called when an executable should be removed from the queue.
|
int |
size()
Returns the amount of executables in queue (not counting executables in flight)
|
protected AbstractQueueOfExecutables(ExecutorCalculator executorCalculator, CommonContextMap map)
@Nullable public CommonContext inflight(@NotNull ResultKey resultKey)
QueueOfExecutablesinflight in interface QueueOfExecutables@Nullable public CommonContext remove(@NotNull ResultKey resultKey)
QueueOfExecutablesremove in interface QueueOfExecutablespublic boolean enqueue(@NotNull
CommonContext context,
@Nullable
MinimalRequirementSet requirements)
QueueOfExecutablesenqueue in interface QueueOfExecutables@NotNull public com.google.common.collect.ImmutableList<QueueOfExecutables.ExecutableData> executablesForAgent(long agentId)
QueueOfExecutablesexecutablesForAgent in interface QueueOfExecutablespublic void recalculateExecutables(BuildAgent agent)
QueueOfExecutablesrecalculateExecutables in interface QueueOfExecutablespublic void recalculateExecutors()
QueueOfExecutablesrecalculateExecutors in interface QueueOfExecutablespublic int size()
QueueOfExecutablessize in interface QueueOfExecutables@Nullable public Collection<ElasticImageConfiguration> getImagesForExecutable(@NotNull ResultKey resultKey)
QueueOfExecutablesgetImagesForExecutable in interface QueueOfExecutables@Nullable public Set<Long> getExecutorsForExecutable(@NotNull ResultKey resultKey)
QueueOfExecutablesgetExecutorsForExecutable in interface QueueOfExecutablespublic void recalculateExecutors(@NotNull
Set<Key> keys)
QueueOfExecutablesrecalculateExecutors in interface QueueOfExecutableskeys - the keys to invalidate@Nullable public CommonContext get(@NotNull ResultKey resultKey)
QueueOfExecutablesget in interface QueueOfExecutablesCopyright © 2021 Atlassian Software Systems Pty Ltd. All rights reserved.