public interface OnDiskBuildInfo
Modifier and Type | Method and Description |
---|---|
void |
calculateOutputSizeAndWriteMetadata(FileHashLoader fileHashLoader,
com.google.common.collect.ImmutableSortedSet<Path> recordedPaths,
com.google.common.base.Predicate<Long> shouldWriteOutputHashes) |
void |
deleteExistingMetadata()
Deletes both "artifact" and "build" metadata.
|
Optional<String> |
getBuildValue(String key) |
Optional<com.google.common.collect.ImmutableMap<String,String>> |
getMap(String key) |
com.google.common.collect.ImmutableMap<String,String> |
getMetadataForArtifact()
Returns the "build" metadata that is stored with a cache artifact ("artifact" metadata is
stored within the artifact itself).
|
com.google.common.collect.ImmutableSortedSet<Path> |
getOutputPaths() |
com.google.common.collect.ImmutableSortedSet<Path> |
getPathsForArtifact()
Returns the recorded output paths of the rule for creating a cache artifact.
|
Optional<RuleKey> |
getRuleKey(String key)
Returns the
RuleKey for the rule whose output is currently stored on disk. |
Either<String,Exception> |
getValue(String key) |
Optional<com.google.common.collect.ImmutableList<String>> |
getValues(String key) |
com.google.common.collect.ImmutableList<String> |
getValuesOrThrow(String key)
Tries to read the "artifact" values and if it fails it logs the attributes of the file it tried
to read.
|
void |
validateArtifact(Set<Path> extractedFiles) |
Either<String,Exception> getValue(String key)
Optional<String> getBuildValue(String key)
Optional<com.google.common.collect.ImmutableList<String>> getValues(String key)
com.google.common.collect.ImmutableList<String> getValuesOrThrow(String key) throws IOException
IOException
Optional<com.google.common.collect.ImmutableMap<String,String>> getMap(String key)
Optional<RuleKey> getRuleKey(String key)
RuleKey
for the rule whose output is currently stored on disk.
This value would have been written the last time the rule was built successfully.
com.google.common.collect.ImmutableSortedSet<Path> getPathsForArtifact() throws IOException
IOException
com.google.common.collect.ImmutableMap<String,String> getMetadataForArtifact() throws IOException
IOException
void deleteExistingMetadata() throws IOException
IOException
void calculateOutputSizeAndWriteMetadata(FileHashLoader fileHashLoader, com.google.common.collect.ImmutableSortedSet<Path> recordedPaths, com.google.common.base.Predicate<Long> shouldWriteOutputHashes) throws IOException
IOException
void validateArtifact(Set<Path> extractedFiles) throws IOException
IOException
com.google.common.collect.ImmutableSortedSet<Path> getOutputPaths()