diff options
author | tomlu <tomlu@google.com> | 2017-11-29 14:01:21 -0800 |
---|---|---|
committer | Copybara-Service <copybara-piper@google.com> | 2017-11-29 14:03:30 -0800 |
commit | 3d1a194ff9e76f25f1a7242ff2d021523ba8e4a0 (patch) | |
tree | 9fec583a59b8ee6ee0f4fac513d5471956dfe1d3 /src/main/java/com/google/devtools/build/lib/actions/ActionExecutionContext.java | |
parent | 8f8b8859fc7d85feee97481443fb11c0b7ae03ce (diff) |
Add ActionKeyContext to Action#getKey.
This key context can be used by actions to share partial key computations, for instance when computing MD5s for nested sets.
RELNOTES: None
PiperOrigin-RevId: 177359607
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/actions/ActionExecutionContext.java')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/actions/ActionExecutionContext.java | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/actions/ActionExecutionContext.java b/src/main/java/com/google/devtools/build/lib/actions/ActionExecutionContext.java index fc8a6bfb47..f356559a86 100644 --- a/src/main/java/com/google/devtools/build/lib/actions/ActionExecutionContext.java +++ b/src/main/java/com/google/devtools/build/lib/actions/ActionExecutionContext.java @@ -43,6 +43,7 @@ public class ActionExecutionContext implements Closeable { private final Executor executor; private final ActionInputFileCache actionInputFileCache; private final ActionInputPrefetcher actionInputPrefetcher; + private final ActionKeyContext actionKeyContext; private final MetadataHandler metadataHandler; private final FileOutErr fileOutErr; private final ImmutableMap<String, String> clientEnv; @@ -54,6 +55,7 @@ public class ActionExecutionContext implements Closeable { Executor executor, ActionInputFileCache actionInputFileCache, ActionInputPrefetcher actionInputPrefetcher, + ActionKeyContext actionKeyContext, MetadataHandler metadataHandler, FileOutErr fileOutErr, Map<String, String> clientEnv, @@ -61,6 +63,7 @@ public class ActionExecutionContext implements Closeable { @Nullable SkyFunction.Environment env) { this.actionInputFileCache = actionInputFileCache; this.actionInputPrefetcher = actionInputPrefetcher; + this.actionKeyContext = actionKeyContext; this.metadataHandler = metadataHandler; this.fileOutErr = fileOutErr; this.clientEnv = ImmutableMap.copyOf(clientEnv); @@ -73,6 +76,7 @@ public class ActionExecutionContext implements Closeable { Executor executor, ActionInputFileCache actionInputFileCache, ActionInputPrefetcher actionInputPrefetcher, + ActionKeyContext actionKeyContext, MetadataHandler metadataHandler, FileOutErr fileOutErr, Map<String, String> clientEnv, @@ -81,6 +85,7 @@ public class ActionExecutionContext implements Closeable { executor, actionInputFileCache, actionInputPrefetcher, + actionKeyContext, metadataHandler, fileOutErr, clientEnv, @@ -92,6 +97,7 @@ public class ActionExecutionContext implements Closeable { Executor executor, ActionInputFileCache actionInputFileCache, ActionInputPrefetcher actionInputPrefetcher, + ActionKeyContext actionKeyContext, MetadataHandler metadataHandler, FileOutErr fileOutErr, Map<String, String> clientEnv, @@ -100,6 +106,7 @@ public class ActionExecutionContext implements Closeable { executor, actionInputFileCache, actionInputPrefetcher, + actionKeyContext, metadataHandler, fileOutErr, clientEnv, @@ -216,6 +223,10 @@ public class ActionExecutionContext implements Closeable { return Preconditions.checkNotNull(env); } + public ActionKeyContext getActionKeyContext() { + return actionKeyContext; + } + @Override public void close() throws IOException { fileOutErr.close(); @@ -230,6 +241,7 @@ public class ActionExecutionContext implements Closeable { executor, actionInputFileCache, actionInputPrefetcher, + actionKeyContext, metadataHandler, fileOutErr, clientEnv, |