/** * Lookup the leader instance for a given repository. * * @param repo * repository to get the leader for. * @return the leader instance for the repository. * @throws java.net.URISyntaxException * remote configuration contains an invalid URL. */ public KetchLeader get(Repository repo) throws URISyntaxException { String key = computeKey(repo); KetchLeader leader = leaders.get(key); if (leader != null) { return leader; } return startLeader(key, repo); }
@Override public KetchLeader getKetchLeader() { try { return leaders.get(getRepository()); } catch (URISyntaxException e) { throw new RuntimeException(e); } }
final KetchLeader leader; try { leader = leaders.get(repo); } catch (URISyntaxException err) { throw new ServiceNotEnabledException(
/** * Lookup the leader instance for a given repository. * * @param repo * repository to get the leader for. * @return the leader instance for the repository. * @throws URISyntaxException * remote configuration contains an invalid URL. */ public KetchLeader get(Repository repo) throws URISyntaxException { String key = computeKey(repo); KetchLeader leader = leaders.get(key); if (leader != null) { return leader; } return startLeader(key, repo); }
/** * Lookup the leader instance for a given repository. * * @param repo * repository to get the leader for. * @return the leader instance for the repository. * @throws java.net.URISyntaxException * remote configuration contains an invalid URL. */ public KetchLeader get(Repository repo) throws URISyntaxException { String key = computeKey(repo); KetchLeader leader = leaders.get(key); if (leader != null) { return leader; } return startLeader(key, repo); }