Storing and restoring protocol

Storing a compound object, which contains other objects, is more difficult than storing a non compound object. Component objects must be stored first, followed by the containing object.

As part of the process of storing components, one or more head streams are created, with corresponding stream IDs. A store map is used to hold the associations between the in-memory component objects and their associated stream IDs.

The protocol for storing a compound object can be summarized:

  1. construct a store map

  2. store the components, and store their pointer/stream ID associations in the store map

  3. store the containing object, using the store map to store the stream IDs of its components)

  4. delete the store map.

See also

Store map