Interface ReplicationState
- All Known Implementing Classes:
ReplicationStateMetadata
public interface ReplicationState
The per-partition-replica state maintained for push replication.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumThe different replication modes in which a partition replica can be in. -
Method Summary
Modifier and TypeMethodDescriptionmode()The replication mode of this partition replica.longThe current replication session ID for this partition replica.
-
Method Details
-
mode
ReplicationState.Mode 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.
-