public class KetchPreReceive extends java.lang.Object implements PreReceiveHook
Install an instance on ReceivePack to
capture the commands and other connection state and relay them through the
KetchLeader, allowing the leader to
gain consensus about the new reference state.
| Modifier and Type | Field and Description |
|---|---|
private KetchLeader |
leader |
private static org.slf4j.Logger |
log |
NULL| Constructor and Description |
|---|
KetchPreReceive(KetchLeader leader)
Construct a hook executing updates through a
KetchLeader. |
| Modifier and Type | Method and Description |
|---|---|
void |
onPreReceive(ReceivePack rp,
java.util.Collection<ReceiveCommand> cmds)
Invoked just before commands are executed.
|
private void |
waitForPropose(Proposal proposal,
ProgressSpinner spinner) |
private void |
waitForQueue(Proposal proposal,
ProgressSpinner spinner) |
private static final org.slf4j.Logger log
private final KetchLeader leader
public KetchPreReceive(KetchLeader leader)
KetchLeader.leader - leader for this repository.public void onPreReceive(ReceivePack rp, java.util.Collection<ReceiveCommand> cmds)
See the class description for how this method can impact execution.
onPreReceive in interface PreReceiveHookrp - the process handling the current receive. Hooks may obtain
details about the destination repository through this handle.cmds - unmodifiable set of valid commands still pending execution.
May be the empty set.private void waitForQueue(Proposal proposal, ProgressSpinner spinner) throws java.lang.InterruptedException
java.lang.InterruptedExceptionprivate void waitForPropose(Proposal proposal, ProgressSpinner spinner) throws java.lang.InterruptedException
java.lang.InterruptedException