Raft Consensus Algorithm
    Preparing search index...

    Interface ApplicationStateMachine

    Application state machine contract used by the Raft node.

    Implementations must be deterministic for replicated commands in order to keep state consistent across all nodes.

    interface ApplicationStateMachine {
        apply(command: Command): Promise<any>;
        getState(): any;
        installSnapshot(data: Buffer): Promise<void>;
        takeSnapshot(): Promise<Buffer<ArrayBufferLike>>;
    }
    Index

    Methods