[Zodb-checkins] CVS: Zope3/src/zodb/storage - interfaces.py:1.12

Barry Warsaw barry@wooz.org
Mon, 17 Mar 2003 15:24:14 -0500


Update of /cvs-repository/Zope3/src/zodb/storage
In directory cvs.zope.org:/tmp/cvs-serv24439

Modified Files:
	interfaces.py 
Log Message:
pack(): Add docstring and optional gc flag.


=== Zope3/src/zodb/storage/interfaces.py 1.11 => 1.12 ===
--- Zope3/src/zodb/storage/interfaces.py:1.11	Thu Mar 13 17:03:53 2003
+++ Zope3/src/zodb/storage/interfaces.py	Mon Mar 17 15:24:14 2003
@@ -146,7 +146,6 @@
         The arguments are the same as store() except for prev_txn.
         If prev_txn is not None, then prev_txn is the XXX ...?
         """
-        pass
 
     def newObjectId():
         pass
@@ -169,8 +168,21 @@
     def lastSerial(oid):
         pass
 
-    def pack(t):
-        pass
+    def pack(t, gc=True):
+        """Perform a pack on the storage.
+
+        There are two forms of packing: incremental and full gc.  In an
+        incremental pack, only old object revisions are removed.  In a full gc
+        pack, cyclic garbage detection and removal is also performed.
+
+        t is the pack time.  All non-current object revisions older than t
+        will be removed in an incremental pack.
+
+        pack() always performs an incremental pack.  If the gc flag is True,
+        then pack() will also perform a garbage collection.  Some storages
+        (e.g. FileStorage) always do both phases in a pack() call.  Such
+        storages should simply ignore the gc flag.
+        """
 
     # two-phase commit