API for package CL-PREVALENCE

An implementation of Object Prevalence for Common Lisp

*blob-root*   variable

The directory in which to store the blob files
Initial value: NIL

(all-preferences-keys system)   generic-function

Return a list of all persistent preference keys of system

(backup system &key directory)   generic-function

Make backup copies of the current snapshot and transaction-log files

blob   class

A blob is a file-like collection of bytes with related metadata
Class precedence list: blob object-with-id standard-object t
Class init args: :id :keywords :mime-type :size :name

(copy-to-stream blob binary-output-stream)   generic-function

Copy the bytes from blob to binary-output-stream

(destroy blob)   generic-function

Completely destroy blob (removing its byte data file as well)

(drop-index-on system class &optional slots)   function

Drop indexes on each of the slots provided

(execute system object)   generic-function

Ask for a transaction object to be executed on system with ACID properties

(execute-transaction transaction-call)   function

Create a transaction object from transaction-call and execute it

(fill-from-file blob pathname)   generic-function

Fill the blob's contents with the bytes read from the binary file at pathname

(fill-from-stream blob binary-input-stream)   generic-function

Fill the blob's contents with the bytes from binary-input-stream

(find-all-objects system class)   generic-function

Return an unordered collection of all objects in system that are instances of class

(find-object-with-id system class id)   generic-function

Find and return the object in system of class with id, null if not found

(find-object-with-slot system class slot value &optional test)   generic-function

Find and return the object in system of class with slot equal to value, null if not found

(get-file blob)   generic-function

Return the pathname to the bytes of blob

(get-guard guarded-prevalence-system)   generic-function

Access the guard function of a sytem

(setf (get-guard guarded-prevalence-system) value)   generic-function

Set the guard function of a system

(get-id object)   generic-function

Return an external, unique, immutable identifier for object (typically an integer)

(get-keywords blob)   generic-function

Return the list of keywords associated with blob

(setf (get-keywords blob) keywords)   generic-function

Set the keywords list of blob

(get-mime-type blob)   generic-function

Return the mime-type of blob as a string

(setf (get-mime-type blob) mime-type)   generic-function

Set the mime-type string of blob

(get-name blob)   generic-function

Return the descriptive name of blob

(setf (get-name blob) name)   generic-function

Set the descriptive name of blob

(get-option system name)   generic-function

Retrieve a named option from system

(setf (get-option system name) value)   generic-function

Set a named option of system to value

(get-preference system key)   generic-function

Retrieve the value of the persistent preference stored under key in system

(get-root-object system name)   generic-function

Retrieve a root object by symbol name from system

(setf (get-root-object system name) value)   generic-function

Set a symbol named root object of system to value

(get-size blob)   generic-function

Return the size of blob in bytes

guarded-prevalence-system   class

A Prevalence system with a guard thunk
Class precedence list: guarded-prevalence-system prevalence-system standard-object t
Class init args: :directory :serializer :deserializer :file-extension :transaction-hook

(index-on system class &optional slots (test (quote equalp)))   function

Create indexes on each of the slots provided.

(initiates-rollback condition)   generic-function

Return true when a condition initiates a rollback when thrown from a transaction

(make-prevalence-system directory &key (prevalence-system-class (quote prevalence-system)) init-args)   function

Create and return a new prevalence system on directory. When the directory contains a valid snapshot and/or transaction log file, the system will be restored. Optionally specify the prevalence system's class.

(make-transaction function &rest args)   function

Create and return a new transaction specifying a function name and an argument list. The function should accept the system instance prepended to the argument list as arguments and implement the actual transaction in a re-entrant way.

no-rollback-error   condition

Thrown by code inside a transaction to indicate that no rollback is needed
Class precedence list: no-rollback-error error serious-condition condition standard-object t

object-with-id   class

Superclass for objects with an id
Class precedence list: object-with-id standard-object t
Class init args: :id

prevalence-system   class

Base Prevalence system implementation object
Class precedence list: prevalence-system standard-object t
Class init args: :transaction-hook :file-extension :deserializer :serializer :directory

(query system function &rest args)   generic-function

Ask for a query function to be executed on system with args

(remove-root-object system name)   generic-function

Remove the root object by symbol name from system

(restore system)   generic-function

Restore a system from permanent storage

(snapshot system)   generic-function

Take a snapshot of a system

(start-master-client prevalence-system &key (host localhost) (port 7651))   function

Start a connection to host:port to deliver transactions from prevalence-system

(start-slave-server prevalence-system &key (port 7651))   function

Start a server on port accepting transactions to be executed on prevalence-system

(stop-master-client prevalence-sytem)   function

Stop a connection from prevalence-system

(totally-destroy system &key abort)   generic-function

Totally destroy system from permanent storage by deleting any files that we find

transaction   class

A simple Transaction object joining a function and its arguments
Class precedence list: transaction standard-object t
Class init args: :function :args

(tx-change-object-slots system class id slots-and-values)   function

Change some slots of the object of class with id in system using slots and values

(tx-create-id-counter system)   function

Initialize the id counter to 0

(tx-create-object system class &optional slots-and-values)   function

Create a new object of class in system, assigning it a unique id, optionally setting some slots and values

(tx-delete-object system class id)   function

Delete the object of class with id from the system

(tx-set-preference system key value)   function

Set the value of the persistent preference key in system

Documentation generated by lispdoc running on LispWorks