Interface GitFileDiffCache
-
- All Known Implementing Classes:
GitFileDiffCacheImpl
public interface GitFileDiffCache
This cache computes pure git diff for a single file path according to a git tree diff.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description GitFileDiff
get(GitFileDiffCacheKey key)
Returns the git file diff for a single file path identified by its key.com.google.common.collect.ImmutableMap<GitFileDiffCacheKey,GitFileDiff>
getAll(Iterable<GitFileDiffCacheKey> keys)
Returns the file diff for a collection of file paths identified by their keys.
-
-
-
Method Detail
-
get
GitFileDiff get(GitFileDiffCacheKey key) throws DiffNotAvailableException
Returns the git file diff for a single file path identified by its key.- Parameters:
key
- identifies two git trees, a specific file path and other diff parameters.- Returns:
- the file diff for a single file path identified by its key.
- Throws:
DiffNotAvailableException
- if the tree IDs of the key are invalid for this project or if file contents could not be read.
-
getAll
com.google.common.collect.ImmutableMap<GitFileDiffCacheKey,GitFileDiff> getAll(Iterable<GitFileDiffCacheKey> keys) throws DiffNotAvailableException
Returns the file diff for a collection of file paths identified by their keys.- Parameters:
keys
- identifying different file paths of different projects.- Returns:
- a map of the input keys to their corresponding git file diffs.
- Throws:
DiffNotAvailableException
- if the diff failed to be evaluated for one or more of the input keys due to invalid tree IDs or if file contents could not be read.
-
-