Update of /project/elephant/cvsroot/elephant/src In directory common-lisp.net:/tmp/cvs-serv7763/src
Modified Files: controller.lisp Log Message: new license, better defaults for root methods
Date: Sun Aug 29 22:37:58 2004 Author: blee
Index: elephant/src/controller.lisp diff -u elephant/src/controller.lisp:1.5 elephant/src/controller.lisp:1.6 --- elephant/src/controller.lisp:1.5 Sun Aug 29 09:48:34 2004 +++ elephant/src/controller.lisp Sun Aug 29 22:37:58 2004 @@ -12,6 +12,10 @@ ;;; Copyright (c) 2004 by Andrew Blumberg and Ben Lee ;;; ablumberg@common-lisp.net blee@common-lisp.net ;;; +;;; This program is released under the following license +;;; ("GPL"). For differenct licensing terms, contact the +;;; copyright holders. +;;; ;;; This program is free software; you can redistribute it ;;; and/or modify it under the terms of the GNU General ;;; Public License as published by the Free Software @@ -53,30 +57,27 @@ creation, counters, locks, the root and garbage collection, et cetera."))
-(defgeneric add-to-root (sc key value)) -(defgeneric get-from-root (sc key)) -(defgeneric remove-from-root (sc key)) (defgeneric cache-instance (sc obj)) (defgeneric get-cached-instance (sc oid class-name)) (defgeneric next-oid (sc)) (defgeneric open-controller (sc &key recover recover-fatal thread)) (defgeneric close-controller (sc))
-(defmethod add-to-root ((sc store-controller) key value) +(defun add-to-root (key value &key (store-controller *store-controller*)) "Add an arbitrary persistent thing to the root, so you can retrieve it in a later session. Keys may be arbitrary persistables as well (though note collection key semantics!) N.B. this means it (and everything it points to) won't get gc'd." - (setf (get-value key (controller-root sc)) value)) + (setf (get-value key (controller-root store-controller)) value))
-(defmethod get-from-root ((sc store-controller) key) +(defmethod get-from-root (key &key (store-controller *store-controller*)) "Get a persistent thing from the root." - (get-value key (controller-root sc))) + (get-value key (controller-root store-controller)))
-(defmethod remove-from-root ((sc store-controller) key) +(defmethod remove-from-root (key &key (store-controller *store-controller*)) "Get a persistent thing from the root." - (remove-kv key (controller-root sc))) + (remove-kv key (controller-root store-controller)))
(defmethod cache-instance ((sc store-controller) obj) "Register an instance of a user persistent-class with the