Class GitFileDiffCacheImpl
java.lang.Object
com.google.gerrit.server.patch.gitfilediff.GitFileDiffCacheImpl
- All Implemented Interfaces:
- GitFileDiffCache
Implementation of the 
GitFileDiffCache- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic enumEnum for the supported diff algorithms for the file diff computation.static classCreates a new JGit diff algorithm instance using the Gerrit'sGitFileDiffCacheImpl.DiffAlgorithmenum.
- 
Constructor SummaryConstructorsConstructorDescriptionGitFileDiffCacheImpl(com.google.common.cache.LoadingCache<GitFileDiffCacheKey, GitFileDiff> cache) 
- 
Method SummaryModifier and TypeMethodDescriptionget(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.static com.google.inject.Modulemodule()
- 
Constructor Details- 
GitFileDiffCacheImpl@Inject public GitFileDiffCacheImpl(com.google.common.cache.LoadingCache<GitFileDiffCacheKey, GitFileDiff> cache) 
 
- 
- 
Method Details- 
modulepublic static com.google.inject.Module module()
- 
getDescription copied from interface:GitFileDiffCacheReturns the git file diff for a single file path identified by its key.- Specified by:
- getin interface- GitFileDiffCache
- 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.
 
- 
getAllpublic com.google.common.collect.ImmutableMap<GitFileDiffCacheKey,GitFileDiff> getAll(Iterable<GitFileDiffCacheKey> keys) throws DiffNotAvailableException Description copied from interface:GitFileDiffCacheReturns the file diff for a collection of file paths identified by their keys.- Specified by:
- getAllin interface- GitFileDiffCache
- 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.
 
 
-