public class RemoteGitReplica extends KetchReplica
KetchLeader will contact the replica
using the Git wire protocol.
The remote replica may be fully Ketch-aware, or a standard Git server.
KetchReplica.CommitMethod, KetchReplica.CommitSpeed, KetchReplica.Participation, KetchReplica.State| Constructor and Description |
|---|
RemoteGitReplica(KetchLeader leader,
String name,
URIish uri,
ReplicaConfig cfg,
RemoteConfig rc)
Configure a new remote.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
blockingFetch(Repository repo,
ReplicaFetchRequest req)
Fetch objects from the remote using the calling thread.
|
protected String |
describeForLog()
Get description of this replica for error/debug logging purposes.
|
protected RemoteConfig |
getRemoteConfig()
Get optional configuration describing how to contact the peer.
|
URIish |
getURI()
Get URI to contact the remote peer repository.
|
protected void |
startPush(ReplicaPushRequest req)
Begin executing a single push.
|
getCommitMethod, getCommitSpeed, getLeader, getName, getParticipation, getSystem, prepareCommit, shutdownpublic RemoteGitReplica(KetchLeader leader, String name, URIish uri, ReplicaConfig cfg, @Nullable RemoteConfig rc)
leader - instance this replica follows.name - unique-ish name identifying this remote for debugging.uri - URI to connect to the follower's repository.cfg - how Ketch should treat the remote system.rc - optional remote configuration describing how to contact the
peer repository.public URIish getURI()
@Nullable protected RemoteConfig getRemoteConfig()
protected String describeForLog()
describeForLog in class KetchReplicaprotected void startPush(ReplicaPushRequest req)
This method must move processing onto another thread. Called with
KetchLeader.lock held by caller.
startPush in class KetchReplicareq - the request to send to the replica.protected void blockingFetch(Repository repo, ReplicaFetchRequest req) throws NotSupportedException, TransportException
Called without KetchLeader.lock.
blockingFetch in class KetchReplicarepo - local repository to fetch objects into.req - the request to fetch from a replica.NotSupportedExceptionTransportExceptionCopyright © 2019 Eclipse JGit Project. All rights reserved.