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() |
protected RemoteConfig |
getRemoteConfig() |
URIish |
getURI() |
protected void |
startPush(ReplicaPushRequest req)
Begin executing a single push.
|
getCommitMethod, getCommitSpeed, getLeader, getName, getParticipation, getSystem, prepareCommit, shutdown
public 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 KetchReplica
protected void startPush(ReplicaPushRequest req)
KetchReplica
This method must move processing onto another thread.
Called with KetchLeader.lock
held by caller.
startPush
in class KetchReplica
req
- the request to send to the replica.protected void blockingFetch(Repository repo, ReplicaFetchRequest req) throws NotSupportedException, TransportException
KetchReplica
Called without KetchLeader.lock
.
blockingFetch
in class KetchReplica
repo
- local repository to fetch objects into.req
- the request to fetch from a replica.NotSupportedException
TransportException
Copyright © 2017 Eclipse JGit Project. All rights reserved.