Package com.google.gerrit.server.project
Interface ProjectCache
- 
- All Known Implementing Classes:
- ProjectCacheImpl
 
 public interface ProjectCacheCache of project information, including access rights.
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description Iterable<Project.NameKey>all()Iterable<Project.NameKey>byName(String prefix)Filter the set of registered project names by common prefix.ProjectStatecheckedGet(Project.NameKey projectName)Get the cached data for a project by its unique name.ProjectStatecheckedGet(Project.NameKey projectName, boolean strict)Get the cached data for a project by its unique name.voidevict(Project p)Invalidate the cached information about the given project.voidevict(Project.NameKey p)Invalidate the cached information about the given project.ProjectStateget(Project.NameKey projectName)Get the cached data for a project by its unique name.ProjectStategetAllProjects()ProjectStategetAllUsers()Set<AccountGroup.UUID>guessRelevantGroupUUIDs()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- 
getAllProjectsProjectState getAllProjects() - Returns:
- the parent state for all projects on this server.
 
 - 
getAllUsersProjectState getAllUsers() - Returns:
- the project state of the project storing meta data for all users.
 
 - 
getProjectState get(Project.NameKey projectName) Get the cached data for a project by its unique name.- Parameters:
- projectName- name of the project.
- Returns:
- the cached data; null if no such project exists, projectName is null or an error occurred.
- See Also:
- checkedGet(com.google.gerrit.reviewdb.client.Project.NameKey)
 
 - 
checkedGetProjectState checkedGet(Project.NameKey projectName) throws IOException Get the cached data for a project by its unique name.- Parameters:
- projectName- name of the project.
- Returns:
- the cached data; null if no such project exists or projectName is null.
- Throws:
- IOException- when there was an error.
 
 - 
checkedGetProjectState checkedGet(Project.NameKey projectName, boolean strict) throws Exception Get the cached data for a project by its unique name.- Parameters:
- projectName- name of the project.
- strict- true when any error generates an exception
- Returns:
- the cached data or null when strict = false
- Throws:
- Exception- in case of any error (strict = true) or only for I/O or other internal errors.
 
 - 
evictvoid evict(Project p) Invalidate the cached information about the given project.
 - 
evictvoid evict(Project.NameKey p) Invalidate the cached information about the given project.
 - 
removevoid remove(Project p) Remove information about the given project from the cache. It will no longer be returned fromall().
 - 
removevoid remove(Project.NameKey name) Remove information about the given project from the cache. It will no longer be returned fromall().
 - 
allIterable<Project.NameKey> all() - Returns:
- sorted iteration of projects.
 
 - 
guessRelevantGroupUUIDsSet<AccountGroup.UUID> guessRelevantGroupUUIDs() - Returns:
- 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.
 
 - 
byNameIterable<Project.NameKey> byName(String prefix) Filter the set of registered project names by common prefix.- Parameters:
- prefix- common prefix.
- Returns:
- sorted iteration of projects sharing the same prefix.
 
 - 
onCreateProjectvoid onCreateProject(Project.NameKey newProjectName) Notify the cache that a new project was constructed.
 
- 
 
-