public interface ProjectCache
Modifier and Type | Method and Description |
---|---|
com.google.common.collect.ImmutableSortedSet<Project.NameKey> |
all() |
com.google.common.collect.ImmutableSortedSet<Project.NameKey> |
byName(String prefix)
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.
|
ProjectState |
checkedGet(Project.NameKey projectName,
boolean strict)
Get the cached data for a project by its unique name.
|
void |
evict(Project.NameKey p)
Invalidate the cached information about the given project, and triggers reindexing for it
|
void |
evict(Project p)
Invalidate the cached information about the given project, and triggers reindexing for it
|
ProjectState |
get(Project.NameKey projectName)
Get the cached data for a project by its unique name.
|
ProjectState |
getAllProjects() |
ProjectState |
getAllUsers() |
Set<AccountGroup.UUID> |
guessRelevantGroupUUIDs() |
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.
|
ProjectState getAllProjects()
ProjectState getAllUsers()
ProjectState get(Project.NameKey projectName)
projectName
- name of the project.checkedGet(com.google.gerrit.reviewdb.client.Project.NameKey)
ProjectState checkedGet(Project.NameKey projectName) throws IOException
projectName
- name of the project.IOException
- when there was an error.ProjectState checkedGet(Project.NameKey projectName, boolean strict) throws Exception
projectName
- name of the project.strict
- true when any error generates an exceptionException
- in case of any error (strict = true) or only for I/O or other internal
errors.void evict(Project p) throws IOException
p
- project that is being evictedIOException
- thrown if the reindexing failsvoid evict(Project.NameKey p) throws IOException
p
- the NameKey of the project that is being evictedIOException
- thrown if the reindexing failsvoid remove(Project p) throws IOException
all()
.IOException
void remove(Project.NameKey name) throws IOException
all()
.IOException
com.google.common.collect.ImmutableSortedSet<Project.NameKey> all()
Set<AccountGroup.UUID> guessRelevantGroupUUIDs()
com.google.common.collect.ImmutableSortedSet<Project.NameKey> byName(String prefix)
prefix
- common prefix.void onCreateProject(Project.NameKey newProjectName) throws IOException
IOException