public class Follower extends AbstractRaftActorBehavior
context, log
Constructor and Description |
---|
Follower(RaftActorContext context) |
Follower(RaftActorContext context,
String initialLeaderId,
short initialLeaderPayloadVersion) |
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.
|
protected void |
setLeaderId(String leaderId) |
protected void |
setLeaderPayloadVersion(short leaderPayloadVersion) |
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 Follower(RaftActorContext context)
public Follower(RaftActorContext context, String initialLeaderId, short initialLeaderPayloadVersion)
public final String getLeaderId()
RaftActorBehavior
public short getLeaderPayloadVersion()
RaftActorBehavior
protected final void setLeaderPayloadVersion(short leaderPayloadVersion)
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.