Package com.google.gerrit.server.project
Class NullProjectCache
- java.lang.Object
- 
- com.google.gerrit.server.project.NullProjectCache
 
- 
- All Implemented Interfaces:
- ProjectCache
 
 public class NullProjectCache extends Object implements ProjectCache An implementation ofProjectCachewith no operations implemented.
- 
- 
Constructor SummaryConstructors Constructor Description NullProjectCache()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description com.google.common.collect.ImmutableSortedSet<Project.NameKey>all()Returns sorted iteration of projects.com.google.common.collect.ImmutableSortedSet<Project.NameKey>byName(String prefix)Filter the set of registered project names by common prefix.voidevict(Project.NameKey p)Invalidate the cached information about the given project.voidevictAndReindex(Project p)Invalidate the cached information about the given project, and triggers reindexing for itvoidevictAndReindex(Project.NameKey p)Invalidate the cached information about the given project, and triggers reindexing for itOptional<ProjectState>get(Project.NameKey projectName)Get the cached data for a project by its unique name.ProjectStategetAllProjects()Returns the parent state for all projects on this server.ProjectStategetAllUsers()Returns the project state of the project storing meta data for all users.Set<AccountGroup.UUID>guessRelevantGroupUUIDs()Returns estimated set of relevant groups extracted from hot project access rules.voidonCreateProject(Project.NameKey newProjectName)Notify the cache that a new project was constructed.voidremove(Project p)Remove information about the given project from the cache.voidremove(Project.NameKey name)Remove information about the given project from the cache.
 
- 
- 
- 
Method Detail- 
getAllProjectspublic ProjectState getAllProjects() Description copied from interface:ProjectCacheReturns the parent state for all projects on this server.- Specified by:
- getAllProjectsin interface- ProjectCache
 
 - 
getAllUserspublic ProjectState getAllUsers() Description copied from interface:ProjectCacheReturns the project state of the project storing meta data for all users.- Specified by:
- getAllUsersin interface- ProjectCache
 
 - 
getpublic Optional<ProjectState> get(Project.NameKey projectName) throws com.google.gerrit.exceptions.StorageException Description copied from interface:ProjectCacheGet the cached data for a project by its unique name.- Specified by:
- getin interface- ProjectCache
- Parameters:
- projectName- name of the project.
- Returns:
- an Optionalwrapping the cached data;absentif no such project exists or the projectName is null
- Throws:
- com.google.gerrit.exceptions.StorageException- when there was an error.
 
 - 
evictpublic void evict(Project.NameKey p) Description copied from interface:ProjectCacheInvalidate the cached information about the given project.- Specified by:
- evictin interface- ProjectCache
- Parameters:
- p- the NameKey of the project that is being evicted
 
 - 
removepublic void remove(Project p) Description copied from interface:ProjectCacheRemove information about the given project from the cache. It will no longer be returned fromProjectCache.all().- Specified by:
- removein interface- ProjectCache
 
 - 
removepublic void remove(Project.NameKey name) Description copied from interface:ProjectCacheRemove information about the given project from the cache. It will no longer be returned fromProjectCache.all().- Specified by:
- removein interface- ProjectCache
 
 - 
allpublic com.google.common.collect.ImmutableSortedSet<Project.NameKey> all() Description copied from interface:ProjectCacheReturns sorted iteration of projects.- Specified by:
- allin interface- ProjectCache
 
 - 
guessRelevantGroupUUIDspublic Set<AccountGroup.UUID> guessRelevantGroupUUIDs() Description copied from interface:ProjectCacheReturns estimated set of relevant groups extracted from hot project access rules. If the cache is cold or too small for the entire project set of the server, this set may be incomplete.- Specified by:
- guessRelevantGroupUUIDsin interface- ProjectCache
 
 - 
byNamepublic com.google.common.collect.ImmutableSortedSet<Project.NameKey> byName(String prefix) Description copied from interface:ProjectCacheFilter the set of registered project names by common prefix.- Specified by:
- byNamein interface- ProjectCache
- Parameters:
- prefix- common prefix.
- Returns:
- sorted iteration of projects sharing the same prefix.
 
 - 
onCreateProjectpublic void onCreateProject(Project.NameKey newProjectName) throws IOException Description copied from interface:ProjectCacheNotify the cache that a new project was constructed.- Specified by:
- onCreateProjectin interface- ProjectCache
- Throws:
- IOException
 
 - 
evictAndReindexpublic void evictAndReindex(Project p) Description copied from interface:ProjectCacheInvalidate the cached information about the given project, and triggers reindexing for it- Specified by:
- evictAndReindexin interface- ProjectCache
- Parameters:
- p- project that is being evicted
 
 - 
evictAndReindexpublic void evictAndReindex(Project.NameKey p) Description copied from interface:ProjectCacheInvalidate the cached information about the given project, and triggers reindexing for it- Specified by:
- evictAndReindexin interface- ProjectCache
- Parameters:
- p- the NameKey of the project that is being evicted
 
 
- 
 
-