Skip to content

IStateMachine Methods

Defines the replay, snapshot, and acknowledgement protocol for a journal-backed state machine.

OnRecoveryCompleted

virtual
View source
public virtual void OnRecoveryCompleted()
Notifies the state that all prior journal entries and snapshots have been applied.

OnWriteCompleted

virtual
View source
public virtual void OnWriteCompleted()
Notifies the state that all prior journal entries and snapshots which it has written have been written to stable storage.

ReplayEntry(JournalEntry, JournalReplayContext)

abstract
public abstract void ReplayEntry(JournalEntry entry, JournalReplayContext context)
Replays one entry during journal recovery.

Parameters

entryJournalEntry
The entry to replay.
contextJournalReplayContext
The replay context.

Reset(JournalStreamWriter)

abstract
public abstract void Reset(JournalStreamWriter writer)
Resets the state.

Parameters

writerJournalStreamWriter

WritePendingEntries(JournalStreamWriter)

abstract
public abstract void WritePendingEntries(JournalStreamWriter writer)
Writes pending state changes to the journal.

Parameters

writerJournalStreamWriter
The journal stream writer.

WriteSnapshot(JournalStreamWriter)

abstract
public abstract void WriteSnapshot(JournalStreamWriter writer)
Writes a snapshot of the state to the provided writer.

Parameters

writerJournalStreamWriter
The journal stream writer.