Package org.eclipse.jgit.internal.ketch
Class ElectionRound
- java.lang.Object
-
- org.eclipse.jgit.internal.ketch.Round
-
- org.eclipse.jgit.internal.ketch.ElectionRound
-
-
Field Summary
Fields Modifier and Type Field Description private static org.slf4j.Logger
log
private long
term
-
Fields inherited from class org.eclipse.jgit.internal.ketch.Round
acceptedNewIndex, acceptedOldIndex, leader, stageCommands
-
-
Constructor Summary
Constructors Constructor Description ElectionRound(KetchLeader leader, LogIndex head)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
blockUntil(ProposedTimestamp ts)
private ObjectId
bumpTerm(Repository git, ProposedTimestamp ts, ObjectInserter inserter)
(package private) long
getTerm()
private static long
parseTerm(java.util.List<java.lang.String> footer)
(package private) void
start()
Creates a commit forrefs/txn/accepted
and callsRound.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.
-
-
-
Constructor Detail
-
ElectionRound
ElectionRound(KetchLeader leader, LogIndex head)
-
-
Method Detail
-
start
void start() throws java.io.IOException
Description copied from class:Round
Creates a commit forrefs/txn/accepted
and 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.lock
to build objects.
-
success
void success()
Description copied from class:Round
Notify the round it was accepted by a majority of the system.Invoked by the leader with
KetchLeader.lock
held by the caller.
-
getTerm
long getTerm()
-
bumpTerm
private ObjectId bumpTerm(Repository git, ProposedTimestamp ts, ObjectInserter inserter) throws java.io.IOException
- Throws:
java.io.IOException
-
parseTerm
private static long parseTerm(java.util.List<java.lang.String> footer)
-
blockUntil
private void blockUntil(ProposedTimestamp ts) throws java.io.IOException
- Throws:
java.io.IOException
-
-