public class ProjectCacheImpl extends java.lang.Object implements ProjectCache
Modifier and Type | Method and Description |
---|---|
java.util.SortedSet<Project.NameKey> |
all() |
java.lang.Iterable<Project.NameKey> |
byName(java.lang.String pfx)
Filter the set of registered project names by common prefix.
|
ProjectState |
checkedGet(Project.NameKey projectName)
Get the cached data for a project by its unique name.
|
void |
evict(Project.NameKey p)
Invalidate the cached information about the given project.
|
void |
evict(Project p)
Invalidate the cached information about the given project.
|
ProjectState |
get(Project.NameKey projectName)
Get the cached data for a project by its unique name.
|
ProjectState |
getAllProjects() |
ProjectState |
getAllUsers() |
java.util.Set<AccountGroup.UUID> |
guessRelevantGroupUUIDs() |
static com.google.inject.Module |
module() |
void |
onCreateProject(Project.NameKey newProjectName)
Notify the cache that a new project was constructed.
|
void |
remove(Project.NameKey name)
Remove information about the given project from the cache.
|
void |
remove(Project p)
Remove information about the given project from the cache.
|
public static com.google.inject.Module module()
public ProjectState getAllProjects()
getAllProjects
in interface ProjectCache
public ProjectState getAllUsers()
getAllUsers
in interface ProjectCache
public ProjectState get(Project.NameKey projectName)
ProjectCache
get
in interface ProjectCache
projectName
- name of the project.ProjectCache.checkedGet(com.google.gerrit.reviewdb.client.Project.NameKey)
public ProjectState checkedGet(Project.NameKey projectName) throws java.io.IOException
ProjectCache
checkedGet
in interface ProjectCache
projectName
- name of the project.java.io.IOException
- when there was an error.public void evict(Project p)
ProjectCache
evict
in interface ProjectCache
public void evict(Project.NameKey p)
evict
in interface ProjectCache
public void remove(Project p)
ProjectCache
ProjectCache.all()
.remove
in interface ProjectCache
public void remove(Project.NameKey name)
ProjectCache
ProjectCache.all()
.remove
in interface ProjectCache
public void onCreateProject(Project.NameKey newProjectName)
ProjectCache
onCreateProject
in interface ProjectCache
public java.util.SortedSet<Project.NameKey> all()
all
in interface ProjectCache
public java.util.Set<AccountGroup.UUID> guessRelevantGroupUUIDs()
guessRelevantGroupUUIDs
in interface ProjectCache
public java.lang.Iterable<Project.NameKey> byName(java.lang.String pfx)
ProjectCache
byName
in interface ProjectCache
pfx
- common prefix.