| Modifier and Type | Class and Description |
|---|---|
private static class |
ProposalRound.NoOp |
| Modifier and Type | Field and Description |
|---|---|
private RefTree |
queuedTree |
private java.util.List<Proposal> |
todo |
acceptedNewIndex, acceptedOldIndex, leader, stageCommands| Constructor and Description |
|---|
ProposalRound(KetchLeader leader,
LogIndex head,
java.util.List<Proposal> todo,
RefTree tree) |
| Modifier and Type | Method and Description |
|---|---|
(package private) void |
abort() |
private void |
blockUntil(ProposedTimestamp ts) |
private static boolean |
canCombine(java.util.List<Proposal> todo) |
private static boolean |
canCombine(PersonIdent a,
PersonIdent b) |
private static boolean |
canCombine(Proposal a,
Proposal b) |
private ObjectId |
insertMultiProposal(Repository git,
ProposedTimestamp ts,
ObjectInserter inserter) |
private ObjectId |
insertProposals(Repository git,
ProposedTimestamp ts) |
private ObjectId |
insertSingleProposal(Repository git,
ProposedTimestamp ts,
ObjectInserter inserter) |
private java.util.List<ReceiveCommand> |
makeStageList(Repository git,
ObjectInserter inserter) |
private java.lang.String |
message(Proposal p) |
private static java.lang.String |
nullToEmpty(java.lang.String str) |
(package private) void |
start()
Creates a commit for
refs/txn/accepted and calls
Round.runAsync(AnyObjectId) to begin execution of the round across
the system. |
(package private) void |
success()
Notify the round it was accepted by a majority of the system.
|
ProposalRound(KetchLeader leader, LogIndex head, java.util.List<Proposal> todo, @Nullable RefTree tree)
private static boolean canCombine(java.util.List<Proposal> todo)
private static java.lang.String nullToEmpty(@Nullable java.lang.String str)
private static boolean canCombine(@Nullable PersonIdent a, @Nullable PersonIdent b)
void start()
throws java.io.IOException
Roundrefs/txn/accepted and calls
Round.runAsync(AnyObjectId) to begin execution of the round across
the system.
If references are being updated (such as in a ProposalRound) the
RefTree may be modified.
Invoked without KetchLeader.lock to build objects.
private ObjectId insertProposals(Repository git, ProposedTimestamp ts) throws java.io.IOException, ProposalRound.NoOp
java.io.IOExceptionProposalRound.NoOpprivate ObjectId insertSingleProposal(Repository git, ProposedTimestamp ts, ObjectInserter inserter) throws java.io.IOException, ProposalRound.NoOp
java.io.IOExceptionProposalRound.NoOpprivate ObjectId insertMultiProposal(Repository git, ProposedTimestamp ts, ObjectInserter inserter) throws java.io.IOException, ProposalRound.NoOp
java.io.IOExceptionProposalRound.NoOpprivate java.lang.String message(Proposal p)
void abort()
void success()
Round
Invoked by the leader with KetchLeader.lock held by the caller.
private java.util.List<ReceiveCommand> makeStageList(Repository git, ObjectInserter inserter) throws java.io.IOException
java.io.IOExceptionprivate void blockUntil(ProposedTimestamp ts) throws TimeIsUncertainException
TimeIsUncertainException