Raft v0.2.1 Raft.StateMachine behaviour
This module provides a behaviour that can be implemented by clients to make use of the replicated log.
Link to this section Summary
Types
The read or write command
The state for the state machine
The value to return to client after completing a read or write
Callbacks
Called when the leader has established that they still have a majority and haven’t been deposed as described in the raft paper section 8. While it is possible to change the state here it is HIGHLY discouraged. Changes during a read will NOT be persisted or replicated to other servers. Any mutations done here will be lost after a crash recovery or when starting a new server
Called whenever there has been a committed write command
Called when the state machine is initialized
Link to this section Types
The read or write command.
The state for the state machine.
The value to return to client after completing a read or write.
Link to this section Callbacks
Called when the leader has established that they still have a majority and haven’t been deposed as described in the raft paper section 8. While it is possible to change the state here it is HIGHLY discouraged. Changes during a read will NOT be persisted or replicated to other servers. Any mutations done here will be lost after a crash recovery or when starting a new server.
Called whenever there has been a committed write command.
Called when the state machine is initialized.