Modifier and Type | Field and Description |
---|---|
private static org.slf4j.Logger |
log |
private long |
term |
acceptedNewIndex, acceptedOldIndex, leader, stageCommands
Constructor and Description |
---|
ElectionRound(KetchLeader leader,
LogIndex head) |
Modifier and Type | Method and 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 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.
|
ElectionRound(KetchLeader leader, LogIndex head)
void start() throws java.io.IOException
Round
refs/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.
void success()
Round
Invoked by the leader with KetchLeader.lock
held by the caller.
long getTerm()
private ObjectId bumpTerm(Repository git, ProposedTimestamp ts, ObjectInserter inserter) throws java.io.IOException
java.io.IOException
private static long parseTerm(java.util.List<java.lang.String> footer)
private void blockUntil(ProposedTimestamp ts) throws java.io.IOException
java.io.IOException