Package org.eclipse.jgit.internal.ketch
Class KetchLeaderCache
- java.lang.Object
-
- org.eclipse.jgit.internal.ketch.KetchLeaderCache
-
public class KetchLeaderCache extends Object
A cache of live leader instances, keyed by repository.Ketch only assigns a leader to a repository when needed. If
get(Repository)
is called for a repository that does not have a leader, the leader is created and added to the cache.
-
-
Constructor Summary
Constructors Constructor Description KetchLeaderCache(KetchSystem system)
Initialize a new leader cache.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description KetchLeader
get(Repository repo)
Lookup the leader instance for a given repository.
-
-
-
Constructor Detail
-
KetchLeaderCache
public KetchLeaderCache(KetchSystem system)
Initialize a new leader cache.- Parameters:
system
- system configuration for the leaders
-
-
Method Detail
-
get
public KetchLeader get(Repository repo) throws URISyntaxException
Lookup the leader instance for a given repository.- Parameters:
repo
- repository to get the leader for.- Returns:
- the leader instance for the repository.
- Throws:
URISyntaxException
- remote configuration contains an invalid URL.
-
-