@ThreadSafe public interface QueueOfExecutables
Modifier and Type | Interface and Description |
---|---|
static class |
QueueOfExecutables.ExecutableData
Stores basic data about an executable.
|
Modifier and Type | Method and Description |
---|---|
void |
enqueue(CommonContext context)
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.
|
CommonContext |
inflight(ResultKey resultKey)
Called when a given executable is en route to 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)
|
@Nullable CommonContext get(@NotNull ResultKey resultKey)
void enqueue(@NotNull CommonContext context)
context
- @Nullable CommonContext inflight(@NotNull ResultKey resultKey)
@Nullable CommonContext remove(@NotNull ResultKey resultKey)
@NotNull com.google.common.collect.ImmutableList<QueueOfExecutables.ExecutableData> executablesForAgent(long agentId)
void recalculateExecutors(@NotNull Set<Key> keys)
keys
- the keys to invalidatevoid recalculateExecutors()
int size()
Copyright © 2016 Atlassian Software Systems Pty Ltd. All rights reserved.