Next: , Previous: DSR Handling Serialization, Up: Data Store API Reference

8.3 Slot Access

Persistence is implement with a metaclass and several required base classes.

— Class: elephant:persistent-metaclass

Class precedence list: persistent-metaclass, standard-class, class, specializer, metaobject, standard-object, t


Metaclass for persistent classes. Use this metaclass to define persistent classes. All slots are persistent by default; use the :transient flag otherwise. Slots can also be indexed for by-value retrieval.

— Class: elephant:persistent

Class precedence list: persistent, standard-object, t


Abstract superclass for all persistent classes (common to both user-defined classes and Elephant-defined objects such as collections.)

— Class: elephant:persistent-object

Class precedence list: persistent-object, persistent, standard-object, t

Superclass for all user-defined persistent classes. This is automatically inherited if you use the persistent-metaclass metaclass. This allows specialization of functions for user objects that would not be appropriate for Elephant objects such as persistent collections

Persistent objects can be queries for their home store controller so that functions such as map-btree do not need a store-controller argument. (NOTE: Should this function be user visible?)

— Generic Function: elephant-data-store:get-con instance

This is used to find and validate the connection spec maintained for in-memory persistent objects. Should we re-open the controller from the spec if it's not cached? That might be dangerous so for now we error

All objects require a unique object identifier. During new object creation the data store is asked to produce a unique id.

— Generic Function: elephant-data-store:next-oid sc

Provides a persistent source of unique id's

These functions are called by the metaclass protocol to implement the appropriate operations on persistent class slots. Unless protected by a transaction, the side effects of these functions should be atomic, persistent and visible to other threads on completion.

— Generic Function: elephant-data-store:persistent-slot-writer sc new-value instance name

Data store specific slot writer function

— Generic Function: elephant-data-store:persistent-slot-reader sc instance name &optional oids-only

Data store specific slot reader function

— Generic Function: elephant-data-store:persistent-slot-boundp sc instance name

Data store specific slot bound test function

— Generic Function: elephant-data-store:persistent-slot-makunbound sc instance name

Data store specific slot makunbound handler