[elephant-cvs] CVS update: elephant/src/elephant.lisp

blee at common-lisp.net blee at common-lisp.net
Fri Aug 27 17:32:10 UTC 2004


Update of /project/elephant/cvsroot/elephant/src
In directory common-lisp.net:/tmp/cvs-serv13592/src

Modified Files:
	elephant.lisp 
Log Message:
license, name changes, with-transaction* defaulters

Date: Fri Aug 27 10:32:10 2004
Author: blee

Index: elephant/src/elephant.lisp
diff -u elephant/src/elephant.lisp:1.2 elephant/src/elephant.lisp:1.3
--- elephant/src/elephant.lisp:1.2	Thu Aug 26 19:57:52 2004
+++ elephant/src/elephant.lisp	Fri Aug 27 10:32:10 2004
@@ -1,11 +1,58 @@
+;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10 -*-
+;;;
+;;; elephant.lisp -- package definition and utilities
+;;; 
+;;; Initial version 8/26/2004 by Ben Lee
+;;; <blee at common-lisp.net>
+;;; 
+;;; part of
+;;;
+;;; Elephant: an object-oriented database for Common Lisp
+;;;
+;;; Copyright (c) 2004 by Andrew Blumberg and Ben Lee
+;;; <ablumberg at common-lisp.net> <blee at common-lisp.net>
+;;;
+;;; 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
+;;; Foundation; either version 2 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; This program is distributed in the hope that it will be
+;;; useful, but WITHOUT ANY WARRANTY; without even the
+;;; implied warranty of MERCHANTABILITY or FITNESS FOR A
+;;; PARTICULAR PURPOSE. See the GNU General Public License
+;;; for more details.
+;;;
+;;; The GNU General Public License can be found in the file
+;;; LICENSE which should have been distributed with this
+;;; code.  It can also be found at
+;;;
+;;; http://www.opensource.org/licenses/gpl-license.php
+;;;
+;;; You should have received a copy of the GNU General
+;;; Public License along with this program; if not, write
+;;; to the Free Software Foundation, Inc., 59 Temple Place,
+;;; Suite 330, Boston, MA 02111-1307 USA
+;;;
+
 (defpackage elephant
   (:nicknames ele :ele)
   (:use common-lisp sleepycat)
+  (:shadow with-transaction with-transaction-retry)
   (:export *store-controller* *current-transaction* *auto-commit*
 	   store-controller open-controller close-controller 
-	   with-open-controller
+	   with-open-controller controller-path controller-environment
+	   controller-db controller-root
+	   add-to-root get-from-root	   
 	   persistent persistent-object persistent-metaclass
-	   with-transaction with-transaction-retry)
+	   persistent-collection btree get-value remove-kv
+	   db-transaction-begin db-transaction-abort db-transaction-commit
+	   with-transaction with-transaction-retry
+	   db-env-set-timeout db-env-get-timeout
+	   db-env-set-flags db-env-get-flags
+	   db-env-set-lock-detect db-env-get-lock-detect
+	   )
   #+cmu  
   (:import-from :pcl
 		slot-definition-name
@@ -36,7 +83,7 @@
 
 (defparameter *store-controller* nil 
   "The store controller which persistent objects talk to.")
-(defvar *auto-commit* nil)
+(defvar *auto-commit* T)
 
 
 ;; Portable value-weak hash-tables for the cache: when the
@@ -57,7 +104,7 @@
 (defun get-cache (key cache)
   #+(or cmu sbcl scl)
   (let ((val (gethash key cache)))
-    (if val (values (weak-pointer-value val) t)
+    (if val (values (ext:weak-pointer-value val) t)
 	(values nil nil)))
   #-(or cmu sbcl scl)
   (gethash key cache)
@@ -65,8 +112,8 @@
 
 (defun setf-cache (key cache value)
   #+(or cmu sbcl scl)
-  (let ((w (make-weak-pointer value)))
-    (finalize value #'(lambda () (remhash key cache)))
+  (let ((w (ext:make-weak-pointer value)))
+    (ext:finalize value #'(lambda () (remhash key cache)))
     (setf (gethash key cache) w)
     value)
   #+allegro





More information about the Elephant-cvs mailing list