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.Loggerlogprivate longterm-
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 voidblockUntil(ProposedTimestamp ts)private ObjectIdbumpTerm(Repository git, ProposedTimestamp ts, ObjectInserter inserter)(package private) longgetTerm()private static longparseTerm(java.util.List<java.lang.String> footer)(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
-
ElectionRound
ElectionRound(KetchLeader leader, LogIndex head)
-
-
Method Detail
-
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.
-
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.
-
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
-
-