public class Candidate extends AbstractRaftActorBehavior
Candidates (ยง5.2):
context, log
Constructor and Description |
---|
Candidate(RaftActorContext context) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
String |
getLeaderId()
Returns the id of the leader.
|
short |
getLeaderPayloadVersion()
Returns the leader's payload data version.
|
protected RaftActorBehavior |
handleAppendEntries(akka.actor.ActorRef sender,
AppendEntries appendEntries)
Derived classes should not directly handle AppendEntries messages it
should let the base class handle it first.
|
protected RaftActorBehavior |
handleAppendEntriesReply(akka.actor.ActorRef sender,
AppendEntriesReply appendEntriesReply)
Derived classes should not directly handle AppendEntriesReply messages it
should let the base class handle it first.
|
RaftActorBehavior |
handleMessage(akka.actor.ActorRef sender,
Object message)
Handle a message.
|
protected RaftActorBehavior |
handleRequestVoteReply(akka.actor.ActorRef sender,
RequestVoteReply requestVoteReply)
Derived classes should not directly handle RequestVoteReply messages it
should let the base class handle it first.
|
actor, appendEntries, applyLogToStateMachine, canGrantVote, canStartElection, createBehavior, currentTerm, electionDuration, getId, getLogEntryIndex, getLogEntryOrSnapshotTerm, getLogEntryTerm, getMajorityVoteCount, getReplicatedToAllIndex, internalSwitchBehavior, internalSwitchBehavior, lastIndex, lastTerm, logName, performSnapshotWithoutCapture, removeClientRequestTracker, requestVote, scheduleElection, setReplicatedToAllIndex, state, stopElection, switchBehavior, votedFor
public Candidate(RaftActorContext context)
public final String getLeaderId()
RaftActorBehavior
public final short getLeaderPayloadVersion()
RaftActorBehavior
protected RaftActorBehavior handleAppendEntries(akka.actor.ActorRef sender, AppendEntries appendEntries)
AbstractRaftActorBehavior
handleAppendEntries
in class AbstractRaftActorBehavior
sender
- The actor that sent this messageappendEntries
- The AppendEntries messageprotected RaftActorBehavior handleAppendEntriesReply(akka.actor.ActorRef sender, AppendEntriesReply appendEntriesReply)
AbstractRaftActorBehavior
handleAppendEntriesReply
in class AbstractRaftActorBehavior
sender
- The actor that sent this messageappendEntriesReply
- The AppendEntriesReply messageprotected RaftActorBehavior handleRequestVoteReply(akka.actor.ActorRef sender, RequestVoteReply requestVoteReply)
AbstractRaftActorBehavior
handleRequestVoteReply
in class AbstractRaftActorBehavior
sender
- The actor that sent this messagerequestVoteReply
- The RequestVoteReply messagepublic RaftActorBehavior handleMessage(akka.actor.ActorRef sender, Object message)
RaftActorBehavior
handleMessage
in interface RaftActorBehavior
handleMessage
in class AbstractRaftActorBehavior
sender
- The sender of the messagemessage
- A message that needs to be processedpublic void close()
Copyright © 2019 OpenDaylight. All rights reserved.