readIndexBehavior

var readIndexBehavior: suspend () -> Long

Behavior of readIndex. Defaults to contract-faithful: throws NotLeaderException unless role is RaftRole.Leader, otherwise confirms immediately and returns the current commitIndex (the single-voter fast path — this double has no peers to poll).

Override to script a deposed-but-unaware leader — a node whose role still reads RaftRole.Leader but that can no longer assemble a voter quorum at its term:

node.readIndexBehavior = { throw LeadershipLostException("deposed") }