aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/actions/BlazeExecutor.java
diff options
context:
space:
mode:
authorGravatar Philipp Wollermann <philwo@google.com>2016-02-26 21:55:31 +0000
committerGravatar Damien Martin-Guillerez <dmarting@google.com>2016-02-28 17:04:30 +0000
commit1ecdc51abf8a52d7e312be6cdad16c7ead68e75a (patch)
treed7d9cfe39939e78785263be2c1001ea237c4b754 /src/main/java/com/google/devtools/build/lib/actions/BlazeExecutor.java
parent64e7a3f3c2de2cd32433fc85f9db754bd473210a (diff)
Let ActionContextConsumer#getActionContexts() return a Multimap instead of a Map.
This makes it possible to request multiple implementations of the same ActionContext to be available via Executor#getContext(). Currently, specialized SpawnActionContexts like the sandbox or the worker strategy that might have to do a fallback each instantiate their own private copy of e.g. the StandaloneSpawnStrategy. With this change, they can instead get a global instance from the Executor. -- MOS_MIGRATED_REVID=115705811
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/actions/BlazeExecutor.java')
-rw-r--r--src/main/java/com/google/devtools/build/lib/actions/BlazeExecutor.java1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/actions/BlazeExecutor.java b/src/main/java/com/google/devtools/build/lib/actions/BlazeExecutor.java
index 5cca649974..88dc9a3f2d 100644
--- a/src/main/java/com/google/devtools/build/lib/actions/BlazeExecutor.java
+++ b/src/main/java/com/google/devtools/build/lib/actions/BlazeExecutor.java
@@ -107,6 +107,7 @@ public final class BlazeExecutor implements Executor {
if (annotation != null) {
contextMap.put(annotation.contextType(), context);
}
+ contextMap.put(context.getClass(), context);
}
for (ActionContextProvider factory : contextProviders) {