[Zope-CVS] CVS: Products/AdaptableStorage/zodb - ASConnection.py:1.19

Shane Hathaway shane@zope.com
Thu, 6 Feb 2003 14:08:55 -0500


Update of /cvs-repository/Products/AdaptableStorage/zodb
In directory cvs.zope.org:/tmp/cvs-serv3319/zodb

Modified Files:
	ASConnection.py 
Log Message:
Removed the volatile object mapper feature.  Setting the cache_size to 0
is simpler and faster, and although volatile mappers provide more
fine-grained control over caching, they don't seem to be needed for now.

To bring the feature back, do this:

cvs up -j without-volatile-mappers -j with-volatile-mappers



=== Products/AdaptableStorage/zodb/ASConnection.py 1.18 => 1.19 ===
--- Products/AdaptableStorage/zodb/ASConnection.py:1.18	Wed Feb  5 15:06:39 2003
+++ Products/AdaptableStorage/zodb/ASConnection.py	Thu Feb  6 14:08:52 2003
@@ -44,7 +44,6 @@
     The mapper might, for example, serialize all objects as
     tabular records.
     """
-    _volatile = None  # { oid -> 1 }
     _root_mapper = None
 
     no_mtime_available = 1  # Flag recognized by the PersistentExtra base class
@@ -359,13 +358,6 @@
             if unmanaged:
                 self.handleUnmanaged(object, unmanaged)
 
-            if mapper.isVolatile():
-                v = self._volatile
-                if v is None:
-                    v = {}
-                    self._volatile = v
-                v[oid] = 1
-
             object._p_serial=serial
 
             if invalid:
@@ -432,37 +424,6 @@
         oid = self.new_oid()
         keychain = self._db._oid_encoder.decode(oid)
         return keychain[-1]
-
-
-    ### Volatile object expiration ###
-
-    def invalidateVolatileObjects(self):
-        """Requests invalidation of the loaded volatile objects.
-        """
-        v = self._volatile
-        if not v:
-            return
-        self._invalidated.update(v)
-        self._volatile.clear()
-
-
-    # Hook some opportunities to remove volatile objects.
-
-    def _setDB(self, odb):
-        self.invalidateVolatileObjects()
-        Connection._setDB(self, odb)
-
-    def tpc_abort(self, transaction):
-        self.invalidateVolatileObjects()
-        Connection.tpc_abort(self, transaction)
-
-    def tpc_finish(self, transaction):
-        self.invalidateVolatileObjects()
-        Connection.tpc_finish(self, transaction)
-
-    def sync(self):
-        self.invalidateVolatileObjects()
-        Connection.sync(self)
 
 
     def exportFile(self, oid, file=None):