diff options
author | 2018-06-06 20:09:57 -0700 | |
---|---|---|
committer | 2018-06-06 20:11:33 -0700 | |
commit | 602cc856051b02328ed56e2af808b829dafecd4b (patch) | |
tree | 3c7f8b6e3e672ad173204b7dec29b62b7becd4b8 /src/main/java/com/google/devtools/build/lib/actions/cache/ActionCache.java | |
parent | 89d85ea3c515cb288a388d89673e773f6806d7fa (diff) |
Refactoring: makes the code simpler by deleting Metadata and InputArtifactData.
(minor) ActionFS now implements MetadataProvider.getInput
PiperOrigin-RevId: 199575194
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/actions/cache/ActionCache.java')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/actions/cache/ActionCache.java | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/actions/cache/ActionCache.java b/src/main/java/com/google/devtools/build/lib/actions/cache/ActionCache.java index fc21b41a2d..c6ab5604a2 100644 --- a/src/main/java/com/google/devtools/build/lib/actions/cache/ActionCache.java +++ b/src/main/java/com/google/devtools/build/lib/actions/cache/ActionCache.java @@ -18,6 +18,7 @@ import com.google.common.base.Preconditions; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.Lists; +import com.google.devtools.build.lib.actions.FileArtifactValue; import com.google.devtools.build.lib.actions.cache.Protos.ActionCacheStatistics; import com.google.devtools.build.lib.actions.cache.Protos.ActionCacheStatistics.MissReason; import com.google.devtools.build.lib.concurrent.ThreadSafety.ThreadCompatible; @@ -79,7 +80,7 @@ public interface ActionCache { // Null iff the corresponding action does not do input discovery. private final List<String> files; // If null, md5Digest is non-null and the entry is immutable. - private Map<String, Metadata> mdMap; + private Map<String, FileArtifactValue> mdMap; private Md5Digest md5Digest; private final Md5Digest usedClientEnvDigest; @@ -103,10 +104,10 @@ public interface ActionCache { } /** - * Adds the artifact, specified by the executable relative path and its - * metadata into the cache entry. + * Adds the artifact, specified by the executable relative path and its metadata into the cache + * entry. */ - public void addFile(PathFragment relativePath, Metadata md) { + public void addFile(PathFragment relativePath, FileArtifactValue md) { Preconditions.checkState(mdMap != null); Preconditions.checkState(!isCorrupted()); Preconditions.checkState(md5Digest == null); |