/** * Construct the KetchLeader instance of a repository. * * @param repo * local repository stored by the leader. * @return leader instance. * @throws java.net.URISyntaxException * a follower configuration contains an unsupported URI. */ public KetchLeader createLeader(Repository repo) throws URISyntaxException { KetchLeader leader = new KetchLeader(this) { @Override protected Repository openRepository() { repo.incrementOpen(); return repo; } }; leader.setReplicas(createReplicas(leader, repo)); return leader; }
/** * Construct the KetchLeader instance of a repository. * * @param repo * local repository stored by the leader. * @return leader instance. * @throws java.net.URISyntaxException * a follower configuration contains an unsupported URI. */ public KetchLeader createLeader(Repository repo) throws URISyntaxException { KetchLeader leader = new KetchLeader(this) { @Override protected Repository openRepository() { repo.incrementOpen(); return repo; } }; leader.setReplicas(createReplicas(leader, repo)); return leader; }
/** * Construct the KetchLeader instance of a repository. * * @param repo * local repository stored by the leader. * @return leader instance. * @throws URISyntaxException * a follower configuration contains an unsupported URI. */ public KetchLeader createLeader(final Repository repo) throws URISyntaxException { KetchLeader leader = new KetchLeader(this) { @Override protected Repository openRepository() { repo.incrementOpen(); return repo; } }; leader.setReplicas(createReplicas(leader, repo)); return leader; }