Package com.google.gerrit.server.git
Class LocalDiskRepositoryManager
- java.lang.Object
- 
- com.google.gerrit.server.git.LocalDiskRepositoryManager
 
- 
- All Implemented Interfaces:
- GitRepositoryManager
 - Direct Known Subclasses:
- MultiBaseLocalDiskRepositoryManager
 
 public class LocalDiskRepositoryManager extends Object implements GitRepositoryManager Manages Git repositories stored on the local filesystem.
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classLocalDiskRepositoryManager.Lifecyclestatic classLocalDiskRepositoryManager.LocalDiskRepositoryManagerModuleprotected classLocalDiskRepositoryManager.ProjectVisitor- 
Nested classes/interfaces inherited from interface com.google.gerrit.server.git.GitRepositoryManagerGitRepositoryManager.Status
 
- 
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description BooleancanPerformGC()Check if garbage collection can be performed by the repository manager.org.eclipse.jgit.lib.RepositorycreateRepository(Project.NameKey name)Create (and open) a repository by name.PathgetBasePath(Project.NameKey name)Return the basePath under which the specified project is stored.GitRepositoryManager.StatusgetRepositoryStatus(Project.NameKey name)GetGitRepositoryManager.Statusof the repository by name.SortedSet<Project.NameKey>list()Returns set of all known projects, sorted by natural NameKey order.org.eclipse.jgit.lib.RepositoryopenRepository(Project.NameKey name)Get (or open) a repository by name.protected voidscanProjects(LocalDiskRepositoryManager.ProjectVisitor visitor)
 
- 
- 
- 
Method Detail- 
getBasePathpublic Path getBasePath(Project.NameKey name) Return the basePath under which the specified project is stored.- Parameters:
- name- the name of the project
- Returns:
- base directory
 
 - 
getRepositoryStatuspublic GitRepositoryManager.Status getRepositoryStatus(Project.NameKey name) Description copied from interface:GitRepositoryManagerGetGitRepositoryManager.Statusof the repository by name.- Specified by:
- getRepositoryStatusin interface- GitRepositoryManager
 
 - 
openRepositorypublic org.eclipse.jgit.lib.Repository openRepository(Project.NameKey name) throws org.eclipse.jgit.errors.RepositoryNotFoundException Description copied from interface:GitRepositoryManagerGet (or open) a repository by name.- Specified by:
- openRepositoryin interface- GitRepositoryManager
- Parameters:
- name- the repository name, relative to the base directory.
- Returns:
- the cached Repository instance. Caller must call close()when done to decrement the resource handle.
- Throws:
- org.eclipse.jgit.errors.RepositoryNotFoundException- the name does not denote an existing repository.
 
 - 
createRepositorypublic org.eclipse.jgit.lib.Repository createRepository(Project.NameKey name) throws org.eclipse.jgit.errors.RepositoryNotFoundException, RepositoryExistsException, IOException Description copied from interface:GitRepositoryManagerCreate (and open) a repository by name.- Specified by:
- createRepositoryin interface- GitRepositoryManager
- Parameters:
- name- the repository name, relative to the base directory.
- Returns:
- the cached Repository instance. Caller must call close()when done to decrement the resource handle.
- Throws:
- org.eclipse.jgit.errors.RepositoryNotFoundException- the name is invalid.
- RepositoryExistsException- repository exists.
- RepositoryCaseMismatchException- the name collides with an existing repository name, but only in case of a character within the name.
- IOException- the repository cannot be created.
 
 - 
canPerformGCpublic Boolean canPerformGC() Description copied from interface:GitRepositoryManagerCheck if garbage collection can be performed by the repository manager.- Specified by:
- canPerformGCin interface- GitRepositoryManager
- Returns:
- true if repository can perform garbage collection.
 
 - 
listpublic SortedSet<Project.NameKey> list() Description copied from interface:GitRepositoryManagerReturns set of all known projects, sorted by natural NameKey order.- Specified by:
- listin interface- GitRepositoryManager
 
 - 
scanProjectsprotected void scanProjects(LocalDiskRepositoryManager.ProjectVisitor visitor) 
 
- 
 
-