Next: Persistence Environments, Previous: Operations on actormaps, Up: Persistence [Contents][Index]
When a vat is spawned, it can be spawned as a persistent vat with a given persistence environment and set of roots. The vat also has a storage provider associated with it. Vats can be persisted either on each churn (when the vat reaches quiescence), or manually. If a vat is configured to persist on churns, just the objects which have changed (using become) will be persisted.
[#:log-capacity]
Create and return a reference to a new vat configured with persistence.
'churn
will persist on churns, otherwise
in a manual persistence mode (default: 'churn
).
spawn-fibrous-vat
.
name: Name of the vat. Note that this is not the name it is bound to in the current namespace.
#t
, log vat events; otherwise, do not.
(define-actor (^counter bcom value) (lambda () (bcom (^counter bcom (+ 1 value)) value))) (define persistence-env (make-persistence-env `((((counter) ^counter) ,^counter)))) (define-values (vat my-counter) (spawn-persistent-vat persistence-env (lambda () (spawn ^counter 0)) (make-memory-store)))
Next: Persistence Environments, Previous: Operations on actormaps, Up: Persistence [Contents][Index]