Package org.eclipse.jgit.internal.ketch
Class ProposalRound
- java.lang.Object
-
- org.eclipse.jgit.internal.ketch.Round
-
- org.eclipse.jgit.internal.ketch.ProposalRound
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static classProposalRound.NoOp
-
Field Summary
Fields Modifier and Type Field Description private RefTreequeuedTreeprivate java.util.List<Proposal>todo-
Fields inherited from class org.eclipse.jgit.internal.ketch.Round
acceptedNewIndex, acceptedOldIndex, leader, stageCommands
-
-
Constructor Summary
Constructors Constructor Description ProposalRound(KetchLeader leader, LogIndex head, java.util.List<Proposal> todo, RefTree tree)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) voidabort()private voidblockUntil(ProposedTimestamp ts)private static booleancanCombine(java.util.List<Proposal> todo)private static booleancanCombine(Proposal a, Proposal b)private static booleancanCombine(PersonIdent a, PersonIdent b)private ObjectIdinsertMultiProposal(Repository git, ProposedTimestamp ts, ObjectInserter inserter)private ObjectIdinsertProposals(Repository git, ProposedTimestamp ts)private ObjectIdinsertSingleProposal(Repository git, ProposedTimestamp ts, ObjectInserter inserter)private java.util.List<ReceiveCommand>makeStageList(Repository git, ObjectInserter inserter)private java.lang.Stringmessage(Proposal p)private static java.lang.StringnullToEmpty(java.lang.String str)(package private) voidstart()Creates a commit forrefs/txn/acceptedand callsRound.runAsync(AnyObjectId)to begin execution of the round across the system.(package private) voidsuccess()Notify the round it was accepted by a majority of the system.
-
-
-
Constructor Detail
-
ProposalRound
ProposalRound(KetchLeader leader, LogIndex head, java.util.List<Proposal> todo, @Nullable RefTree tree)
-
-
Method Detail
-
canCombine
private static boolean canCombine(java.util.List<Proposal> todo)
-
nullToEmpty
private static java.lang.String nullToEmpty(@Nullable java.lang.String str)
-
canCombine
private static boolean canCombine(@Nullable PersonIdent a, @Nullable PersonIdent b)
-
start
void start() throws java.io.IOExceptionDescription copied from class:RoundCreates a commit forrefs/txn/acceptedand callsRound.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.lockto build objects.
-
insertProposals
private ObjectId insertProposals(Repository git, ProposedTimestamp ts) throws java.io.IOException, ProposalRound.NoOp
- Throws:
java.io.IOExceptionProposalRound.NoOp
-
insertSingleProposal
private ObjectId insertSingleProposal(Repository git, ProposedTimestamp ts, ObjectInserter inserter) throws java.io.IOException, ProposalRound.NoOp
- Throws:
java.io.IOExceptionProposalRound.NoOp
-
insertMultiProposal
private ObjectId insertMultiProposal(Repository git, ProposedTimestamp ts, ObjectInserter inserter) throws java.io.IOException, ProposalRound.NoOp
- Throws:
java.io.IOExceptionProposalRound.NoOp
-
message
private java.lang.String message(Proposal p)
-
abort
void abort()
-
success
void success()
Description copied from class:RoundNotify the round it was accepted by a majority of the system.Invoked by the leader with
KetchLeader.lockheld by the caller.
-
makeStageList
private java.util.List<ReceiveCommand> makeStageList(Repository git, ObjectInserter inserter) throws java.io.IOException
- Throws:
java.io.IOException
-
blockUntil
private void blockUntil(ProposedTimestamp ts) throws TimeIsUncertainException
- Throws:
TimeIsUncertainException
-
-