RaftStorage
Durable state that a Raft node must persist to survive restarts.
Raft's safety guarantees depend on two categories of durable state: vote metadata (current term and who the node voted for in that term) and the log (the ordered sequence of committed and uncommitted entries).
All writes must be synchronised to stable storage before the corresponding RPC reply is sent. In-memory implementations (e.g. InMemoryRaftStorage) are safe for ephemeral use (tests, transient players) but lose state on process exit.
Inheritors
Functions
Appends entries to the end of the persistent log.
Removes all log entries with index <= throughIndex. Idempotent; tolerates a floor below the first retained entry.
Returns the stored snapshot, or null if none has been saved.
Persists state as the snapshot covering all entries with index <= meta.lastIncludedIndex.
Persists nodeId as the node voted for in the current term.
Removes all log entries with index >= [index].