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 forRepositoryCache
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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Repository
open(boolean mustExist)
Called byRepositoryCache.open(Key)
if it doesn't exist yet.
-
-
-
Method Detail
-
open
Repository open(boolean mustExist) throws IOException, RepositoryNotFoundException
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.
-
-