Next: , Previous: Running the Tests, Up: Tutorial


2.4 The Root

Liveness in a store is determined by reachability from the root object. Technically, liveness also applies to indexed classes, as described in See Class Indices, which live in a separate class-root namespace. When garbage collection is implemented, dead objects will be collected on gc's.) The root and class-root objects are BTrees, effectively a table with sorted keys and log(N) access time. See Using BTrees.

You can put something into the root object by

     * (add-to-root "my key" "my value")
     => NIL

and get things out via

     * (get-from-root "my key")
     => "my value"
     => T

The root object is available as

     * (controller-root *store-controller*)
     => #<BTREE {492AE37D}>

It is an instance of a class "btree"; See Using BTrees.