An in-memory implementation of the Checkpointer interface. Stores
checkpoints in a dedicated R environment. This is useful for testing or
short-lived sessions where persistence to disk is not required.
Super class
HydraR::Checkpointer -> MemorySaver
Methods
Method new()
Initialize MemorySaver
Creates a new environment for in-memory checkpoint storage.
Usage
MemorySaver$new()Method get()
Load state from the checkpointer.
Examples
if (FALSE) { # \dontrun{
# 1. Use MemorySaver for transient testing or short sessions
saver <- MemorySaver$new()
dag <- dag_create(checkpointer = saver)
# 2. States are saved in the 'storage' environment under thread_id
dag$run(thread_id = "test_run_01")
ls(saver$storage) # Returns "test_run_01"
} # }