[Zope3-checkins] CVS: ZODB4/src/zodb/storage - base.py:1.9

Barry Warsaw barry@wooz.org
Fri, 24 Jan 2003 13:51:21 -0500


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

Modified Files:
	base.py 
Log Message:
_version_check(), _dorecovery(): Split these out and call them from
the base class's __init__().  Provide stubs for subclasses.


=== ZODB4/src/zodb/storage/base.py 1.8 => 1.9 ===
--- ZODB4/src/zodb/storage/base.py:1.8	Thu Jan 23 15:38:57 2003
+++ ZODB4/src/zodb/storage/base.py	Fri Jan 24 13:51:19 2003
@@ -515,6 +515,8 @@
         self._oidqueue = self._setupDB('oidqueue', 0, db.DB_QUEUE, 8)
         # Do storage specific initialization
         self._init()
+        self._withtxn(self._version_check)
+        self._withlock(self._dorecovery)
         # Initialize the object id counter.
         self._init_oid()
         # Set up the checkpointing thread
@@ -535,6 +537,12 @@
         self.log('ready')
 
     def _init(self):
+        raise NotImplementedError
+
+    def _version_check(self):
+        raise NotImplementedError
+
+    def _dorecovery(self):
         raise NotImplementedError
 
     def _make_autopacker(self, event):