Class ModifiedFilesCacheImpl
java.lang.Object
com.google.gerrit.server.patch.diff.ModifiedFilesCacheImpl
- All Implemented Interfaces:
- 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 GitModifiedFilesCache to retrieve the git modified
 files.
 
If the ModifiedFilesCacheKey.aCommit() is equal to ObjectId.zeroId(), the diff
 will be evaluated against the empty tree, and the result will be exactly the same as the caller
 can get from GitModifiedFilesCache.get(GitModifiedFilesCacheKey)
- 
Constructor SummaryConstructorsConstructorDescriptionModifiedFilesCacheImpl(com.google.common.cache.LoadingCache<ModifiedFilesCacheKey, com.google.common.collect.ImmutableList<ModifiedFile>> cache) 
- 
Method SummaryModifier and TypeMethodDescriptioncom.google.common.collect.ImmutableList<ModifiedFile>get(ModifiedFilesCacheKey key) Returns the list ofModifiedFiles between the 2 git commits identified by the keyOptional<com.google.common.collect.ImmutableList<ModifiedFile>>static com.google.inject.Modulemodule()voidput(ModifiedFilesCacheKey key, com.google.common.collect.ImmutableList<ModifiedFile> modifiedFiles) 
- 
Constructor Details- 
ModifiedFilesCacheImpl@Inject public ModifiedFilesCacheImpl(com.google.common.cache.LoadingCache<ModifiedFilesCacheKey, com.google.common.collect.ImmutableList<ModifiedFile>> cache) 
 
- 
- 
Method Details- 
modulepublic static com.google.inject.Module module()
- 
getpublic com.google.common.collect.ImmutableList<ModifiedFile> get(ModifiedFilesCacheKey key) throws DiffNotAvailableException Description copied from interface:ModifiedFilesCacheReturns the list ofModifiedFiles between the 2 git commits identified by the key- Specified by:
- getin interface- ModifiedFilesCache
- Parameters:
- key- used to identify two git commits and contains other attributes to control the diff calculation.
- 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.
 
- 
getIfPresentpublic Optional<com.google.common.collect.ImmutableList<ModifiedFile>> getIfPresent(ModifiedFilesCacheKey key) 
- 
putpublic void put(ModifiedFilesCacheKey key, com.google.common.collect.ImmutableList<ModifiedFile> modifiedFiles) 
 
-