Class GitFileDiffCacheImpl
- java.lang.Object
- 
- com.google.gerrit.server.patch.gitfilediff.GitFileDiffCacheImpl
 
- 
- All Implemented Interfaces:
- GitFileDiffCache
 
 public class GitFileDiffCacheImpl extends Object implements GitFileDiffCache Implementation of theGitFileDiffCache
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classGitFileDiffCacheImpl.DiffAlgorithmEnum for the supported diff algorithms for the file diff computation.static classGitFileDiffCacheImpl.DiffAlgorithmFactoryCreates a new JGit diff algorithm instance using the Gerrit'sGitFileDiffCacheImpl.DiffAlgorithmenum.
 - 
Constructor SummaryConstructors Constructor Description GitFileDiffCacheImpl(com.google.common.cache.LoadingCache<GitFileDiffCacheKey,GitFileDiff> cache)
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description GitFileDiffget(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 Detail- 
GitFileDiffCacheImpl@Inject public GitFileDiffCacheImpl(com.google.common.cache.LoadingCache<GitFileDiffCacheKey,GitFileDiff> cache) 
 
- 
 - 
Method Detail- 
modulepublic static com.google.inject.Module module() 
 - 
getpublic GitFileDiff get(GitFileDiffCacheKey key) throws DiffNotAvailableException Description 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.
 
 
- 
 
-