Package org.eclipse.jgit.lib
Interface RepositoryCache.Key
- All Known Implementing Classes:
RepositoryCache.FileKey
- Enclosing class:
- RepositoryCache
public static interface RepositoryCache.Key
Abstract hash key for
RepositoryCache
entries.
A Key instance should be lightweight, and implement hashCode() and equals() such that two Key instances are equal if they represent the same Repository location.
-
Method Summary
Modifier and TypeMethodDescriptionopen
(boolean mustExist) Called byRepositoryCache.open(Key)
if it doesn't exist yet.
-
Method Details
-
open
Called byRepositoryCache.open(Key)
if it doesn't exist yet.If a repository does not exist yet in the cache, the cache will call this method to acquire a handle to it.
- Parameters:
mustExist
- true if the repository must exist in order to be opened; false if a new non-existent repository is permitted to be created (the caller is responsible for calling create).- Returns:
- the new repository instance.
- Throws:
IOException
- the repository could not be read (likely its core.version property is not supported).RepositoryNotFoundException
- There is no repository at the given location, only thrown ifmustExist
is true.
-