happstack-state-0.5.1: Event-based distributed state.

Happstack.State.Checkpoint

Synopsis

Documentation

restoreState :: MVar TxControl -> IO (IO ())Source

Load state from disk and re-run any needed events to fully restore the state. The returned function enables event logging.

createCheckpoint :: MVar TxControl -> IO ()Source

Creates a checkpoint using the provided TxControl. This checkpoint may be used as a safe state with which to start the system, e.g. one may delete all the serialized events that took place after the last checkpoint and start the application fresh from the checkpoint. Calling this function manually is the only way to create checkpoints.