public static interface RepositoryCache.Key
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.
Modifier and Type | Method and Description |
---|---|
Repository |
open(boolean mustExist)
Called by
RepositoryCache.open(Key) if it doesn't exist yet. |
Repository open(boolean mustExist) throws IOException, RepositoryNotFoundException
RepositoryCache.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.
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).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
if mustExist
is true.Copyright © 2019 Eclipse JGit Project. All rights reserved.