Skip to main content

CommitApplier

Trait CommitApplier 

Source
pub trait CommitApplier:
    Send
    + Sync
    + 'static {
    // Required method
    fn apply_committed(&self, group_id: u64, entries: &[LogEntry]) -> u64;
}
Expand description

Callback for applying committed Raft log entries to the state machine.

Called synchronously during the tick loop. Implementations should be fast (enqueue to SPSC, not perform I/O directly).

Required Methods§

Source

fn apply_committed(&self, group_id: u64, entries: &[LogEntry]) -> u64

Apply committed entries for a Raft group.

Returns the index of the last successfully applied entry.

Implementors§