[elephant-cvs] CVS elephant/src/elephant
ieslick
ieslick at common-lisp.net
Fri Nov 10 01:48:49 UTC 2006
Update of /project/elephant/cvsroot/elephant/src/elephant
In directory clnet:/tmp/cvs-serv12829/src/elephant
Modified Files:
controller.lisp variables.lisp
Log Message:
Minor edits only, checkpointing after unrolling some experiments.
--- /project/elephant/cvsroot/elephant/src/elephant/controller.lisp 2006/09/04 05:01:06 1.13
+++ /project/elephant/cvsroot/elephant/src/elephant/controller.lisp 2006/11/10 01:48:49 1.14
@@ -29,7 +29,6 @@
;; Dynamic tracking of active connections
-
(defparameter *elephant-backends*
'((:bdb (:ele-bdb))
(:clsql (:ele-clsql))
@@ -110,6 +109,54 @@
;; ================================================
;;
+;; Callback hooks for persistent variables
+;;
+
+(defvar *variable-hooks* nil
+ "An alist (specs -> varlist) where varlist is tuple of
+ lisp name, store name (auto) and policy")
+
+;;(defun add-hook (name spec)
+;; (if (assoc spec *variable-hooks* :test #'equal)
+;; (push name (assoc spec *variable-hooks* :test #'equal))
+;; (push (cons spec (list name)) *variable-hooks*)))
+
+;;(defun remove-hook (name spec)
+;; (if (assoc spec *variable-hooks* :test #'equal)
+;; (setf (assoc spec *variable-hooks* :test #'equal)
+;; (remove name (assoc spec *variable-hooks* :test #'equal)))
+;; (error "No hooks declared on ~A" spec)))
+
+;; (defmacro defpvar (name spec (policy &rest accessors) initial-value &optional (documentation nil))
+;; `(progn
+;; (defvar ,name ,initial-value ,documentation)
+;; (add-hook ,name ,spec)
+;; ,(case policy
+;; (:wrap-mutators
+;; `(progn
+;; ,(loop for accessor in accessors do
+;; (let ((gf (ensure-generic-function
+;; `(defmethod ,accessor :after (
+
+;; (defpvar *agencies* (:wrap-mutators
+;; 'add-agent
+;; 'remove-agent
+;; 'clear-agents)
+;; nil
+;; "test")
+
+;; (defmethod add-agent (agent)
+;; (push agent *agencies*))
+
+;; (defmethod remove-agent (agent)
+;; (setf *agencies* (remove agent *agencies*)))
+
+;; (defmethod clear-agents (agent)
+;; (setf *agencies* nil))
+
+
+
+;;
;; Open a Store
;;
--- /project/elephant/cvsroot/elephant/src/elephant/variables.lisp 2006/09/05 03:23:17 1.4
+++ /project/elephant/cvsroot/elephant/src/elephant/variables.lisp 2006/11/10 01:48:49 1.5
@@ -69,7 +69,7 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Thread-local specials
-(defparameter *store-controller* nil
+(defvar *store-controller* nil
"The store controller which persistent objects talk to.")
;; Specials which control persistent objects
More information about the Elephant-cvs
mailing list