public class VoteResponseHandlerTask extends AbstractResponseHandlerTask
VoteResponse
sent by VoteRequestHandlerTask
.
Changes node to RaftRole.LEADER
if if majority of the nodes
grants vote for this term via RaftState.toLeader()
.
Appends a no-op entry if
RaftIntegration.getAppendedEntryOnLeaderElection()
is enabled.
See 5.2 Leader election section of In Search of an Understandable Consensus Algorithm paper by Diego Ongaro and John Ousterhout.
VoteResponse
,
VoteRequest
logger, raftNode
Constructor and Description |
---|
VoteResponseHandlerTask(RaftNodeImpl raftNode,
VoteResponse response) |
Modifier and Type | Method and Description |
---|---|
protected void |
handleResponse() |
protected Endpoint |
sender() |
innerRun
run
public VoteResponseHandlerTask(RaftNodeImpl raftNode, VoteResponse response)
protected void handleResponse()
handleResponse
in class AbstractResponseHandlerTask
protected Endpoint sender()
sender
in class AbstractResponseHandlerTask
Copyright © 2022 Hazelcast, Inc.. All Rights Reserved.