Class Follower

java.lang.Object
org.jgroups.protocols.raft.RaftImpl
org.jgroups.protocols.raft.Follower
Direct Known Subclasses:
Learner

public class Follower extends RaftImpl
Implements the behavior of a RAFT follower
Since:
0.1
Author:
Bela Ban
  • Constructor Details

    • Follower

      public Follower(RAFT raft)
  • Method Details

    • handleInstallSnapshotRequest

      public void handleInstallSnapshotRequest(org.jgroups.Message msg, RaftHeader hdr, org.jgroups.Address leader)
      Description copied from class: RaftImpl
      Called when a snapshot sent by the leader is received by a follower. The follower needs to overwrite its snapshot file with the received bytes and reinitialize its log to last_inluded_index and create a dummy LogEntry with last_included_term at last_included_index. This is needed by the next RaftImpl.handleAppendEntriesRequest(LogEntries, Address, int, int, int, int) call to compare to the previous index and term.
      Overrides:
      handleInstallSnapshotRequest in class RaftImpl
      Parameters:
      msg - The snapshot message sent by the leader
      hdr - The internal header containing additional information
      leader - The leader which sent the snapshot