Class ModifiedFilesCacheImpl
- java.lang.Object
- 
- com.google.gerrit.server.patch.diff.ModifiedFilesCacheImpl
 
- 
- All Implemented Interfaces:
- ModifiedFilesCache
 
 public class ModifiedFilesCacheImpl extends Object implements ModifiedFilesCache A cache for the list of Git modified files between 2 commits (patchsets) with extra Gerrit logic.The loader of this cache wraps a GitModifiedFilesCacheto retrieve the git modified files.If the ModifiedFilesCacheKey.aCommit()is equal toConstants.EMPTY_TREE_ID, the diff will be evaluated against the empty tree, and the result will be exactly the same as the caller can get fromGitModifiedFilesCache.get(GitModifiedFilesCacheKey)
- 
- 
Constructor SummaryConstructors Constructor Description ModifiedFilesCacheImpl(com.google.common.cache.LoadingCache<ModifiedFilesCacheKey,com.google.common.collect.ImmutableList<ModifiedFile>> cache)
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description com.google.common.collect.ImmutableList<ModifiedFile>get(ModifiedFilesCacheKey key)static com.google.inject.Modulemodule()
 
- 
- 
- 
Constructor Detail- 
ModifiedFilesCacheImpl@Inject public ModifiedFilesCacheImpl(com.google.common.cache.LoadingCache<ModifiedFilesCacheKey,com.google.common.collect.ImmutableList<ModifiedFile>> cache) 
 
- 
 - 
Method Detail- 
modulepublic static com.google.inject.Module module() 
 - 
getpublic com.google.common.collect.ImmutableList<ModifiedFile> get(ModifiedFilesCacheKey key) throws DiffNotAvailableException - Specified by:
- getin interface- ModifiedFilesCache
- Parameters:
- key- used to identify two git commits and contains other attributes to control the diff calculation.
- Returns:
- the list of ModifiedFiles between the 2 git commits identified by the key.
- Throws:
- DiffNotAvailableException- the supplied commits IDs of the key do no exist, are not IDs of a commit, or an exception occurred while reading a pack file.
 
 
- 
 
-