Interface ReplicationState

All Known Implementing Classes:
ReplicationStateMetadata

public interface ReplicationState
The per-partition-replica state maintained for push replication.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static enum 
    The different replication modes in which a partition replica can be in.
  • Method Summary

    Modifier and Type
    Method
    Description
    The replication mode of this partition replica.
    long
    The current replication session ID for this partition replica.
  • Method Details

    • mode

      The replication mode of this partition replica.
    • replicationSessionId

      long replicationSessionId()

      The current replication session ID for this partition replica. Used for coordinating transitions between pull and push replication mode by the leader and the follower.

      The replication session ID is included in both the Fetch (pull replication) protocol and the AppendRecords (push replication) protocol. It's incremented on the follower whenever the leader requests a transition back to ReplicationState.Mode.PULL.