[elephant-cvs] CVS elephant/src/elephant

ieslick ieslick at common-lisp.net
Fri Feb 16 07:11:02 UTC 2007


Update of /project/elephant/cvsroot/elephant/src/elephant
In directory clnet:/tmp/cvs-serv28850/src/elephant

Modified Files:
	collections.lisp controller.lisp package.lisp 
Log Message:
Cleaned up optimize-storage for BDB backends with optimize-layout generic function on stores and btrees

--- /project/elephant/cvsroot/elephant/src/elephant/collections.lisp	2007/02/14 04:36:10	1.8
+++ /project/elephant/cvsroot/elephant/src/elephant/collections.lisp	2007/02/16 07:11:02	1.9
@@ -57,6 +57,9 @@
 (defgeneric existsp (key bt)
   (:documentation "Test existence of a key / value pair in a BTree"))
 
+(defmethod optimize-layout ((bt t) &key &allow-other-keys)
+  t)
+
 ;;
 ;; Btrees that support secondary indices
 ;;
--- /project/elephant/cvsroot/elephant/src/elephant/controller.lisp	2007/02/14 17:41:29	1.33
+++ /project/elephant/cvsroot/elephant/src/elephant/controller.lisp	2007/02/16 07:11:02	1.34
@@ -307,10 +307,11 @@
   (:documentation
    "Provides a persistent source of unique id's"))
 
-(defgeneric optimize-storage (sc &key &allow-other-keys)
-  (:documentation
-   "Tell the backend to reclaim any storage caused by key deletion, if possible.
-    This should default to return space to the filesystem rather than just to the free list."))
+(defgeneric optimize-layout (sc &key &allow-other-keys)
+  (:documentation "If supported, speed up the index and allocation by freeing up
+                   any available storage and return it to the free list.  See the
+                   methods of backends to determine what options are valid. Supported
+                   both on stores (all btrees and persistent slots) and specific btrees"))
 
 ;;
 ;; Low-level support for metaclass protocol 
@@ -377,7 +378,7 @@
 
 
 ;;
-;; Operations on the root index
+; Operations on the root index
 ;;
 
 (defun add-to-root (key value &key (store-controller *store-controller*))
--- /project/elephant/cvsroot/elephant/src/elephant/package.lisp	2007/02/14 17:41:29	1.13
+++ /project/elephant/cvsroot/elephant/src/elephant/package.lisp	2007/02/16 07:11:02	1.14
@@ -35,7 +35,7 @@
 	   #:get-cached-instance #:flush-instance-cache
 	   #:controller-symbol-cache #:controller-symbol-id-cache
 	   #:controller-fast-symbols-p
-	   #:optimize-storage
+	   #:optimize-layout
 	   #:get-user-configuration-parameter
 
 	   #:upgrade




More information about the Elephant-cvs mailing list