[Zodb-checkins] SVN: ZODB/branches/pycon-multidb/src/ZODB/ - Started work on documenting the storage interface(s)

Christian Theune ct at gocept.com
Sun Mar 20 21:00:02 EST 2005


Log message for revision 29605:
  
   - Started work on documenting the storage interface(s)
   
  

Changed:
  U   ZODB/branches/pycon-multidb/src/ZODB/FileStorage/FileStorage.py
  U   ZODB/branches/pycon-multidb/src/ZODB/FileStorage/format.py
  U   ZODB/branches/pycon-multidb/src/ZODB/interfaces.py

-=-
Modified: ZODB/branches/pycon-multidb/src/ZODB/FileStorage/FileStorage.py
===================================================================
--- ZODB/branches/pycon-multidb/src/ZODB/FileStorage/FileStorage.py	2005-03-21 01:43:28 UTC (rev 29604)
+++ ZODB/branches/pycon-multidb/src/ZODB/FileStorage/FileStorage.py	2005-03-21 02:00:02 UTC (rev 29605)
@@ -542,6 +542,7 @@
             self._lock_release()
 
     def load(self, oid, version):
+        """Return pickle data and serial number."""
         self._lock_acquire()
         try:
             pos = self._lookup_pos(oid)

Modified: ZODB/branches/pycon-multidb/src/ZODB/FileStorage/format.py
===================================================================
--- ZODB/branches/pycon-multidb/src/ZODB/FileStorage/format.py	2005-03-21 01:43:28 UTC (rev 29604)
+++ ZODB/branches/pycon-multidb/src/ZODB/FileStorage/format.py	2005-03-21 02:00:02 UTC (rev 29605)
@@ -68,16 +68,16 @@
 #
 #   - 8-byte data length
 #
-#   ? 8-byte position of non-version data
+#   ? 8-byte position of non-version data record
 #     (if version length > 0)
 #
 #   ? 8-byte position of previous record in this version
 #     (if version length > 0)
 #
-#   ?   version string
+#   ? version string
 #     (if version length > 0)
 #
-#   ?   data
+#   ? data
 #     (data length > 0)
 #
 #   ? 8-byte position of data record containing data

Modified: ZODB/branches/pycon-multidb/src/ZODB/interfaces.py
===================================================================
--- ZODB/branches/pycon-multidb/src/ZODB/interfaces.py	2005-03-21 01:43:28 UTC (rev 29604)
+++ ZODB/branches/pycon-multidb/src/ZODB/interfaces.py	2005-03-21 02:00:02 UTC (rev 29605)
@@ -348,5 +348,128 @@
         entry.
         """)
 
+class IStorage(Interface):
+    """A storage is responsible for storing and retrieving data of objects.
+    """
 
+    def load(oid, version):
+        """XXX"""
 
+    def close():
+        """XXX"""
+        
+    def cleanup():
+        """XXX"""
+        
+    def lastSerial():
+        """XXX"""
+        
+    def lastTransaction():
+        """XXX"""
+
+    def lastTid(oid):
+        """Return last serialno committed for object oid."""
+
+    def loadSerial(oid, serial):
+        """XXX"""
+        
+    def loadBefore(oid, tid):
+        """XXX"""
+        
+    def iterator(start=None, stop=None):
+        """XXX"""
+    
+    def sortKey():
+        """XXX"""
+
+    def getName():
+        """XXX"""
+        
+    def getSize():
+        """XXX"""
+
+    def history(oid, version, length=1, filter=None):
+        """XXX"""
+    
+    def new_oid(last=None):
+        """XXX"""
+        
+    def set_max_oid(possible_new_max_oid):
+        """XXX"""
+
+    def registerDB(db, limit):
+        """XXX"""
+    
+    def isReadOnly():
+        """XXX"""
+    
+    def supportsUndo():
+        """XXX"""
+    
+    def supportsVersions():
+        """XXX"""
+
+    def tpc_abort(transaction):
+        """XXX"""
+        
+    def tpc_begin(transaction):
+        """XXX"""
+
+    def tpc_vote(transaction):
+        """XXX"""
+
+    def tpc_finish(transaction, f=None):
+        """XXX"""
+
+    def getSerial(oid):
+        """XXX"""
+    
+    def loadSerial(oid, serial):
+        """XXX"""
+
+    def loadBefore(oid, tid):
+        """XXX"""
+
+    def getExtensionMethods():
+        """XXX"""
+
+    def copyTransactionsFrom():
+        """XXX"""
+
+    def store(oid, oldserial, data, version, transaction):
+        """
+
+        may return the new serial or not
+        """
+
+class IUndoableStorage(IStorage):
+
+    def undo(transaction_id, txn):
+        """XXX"""
+    
+    def undoInfo():
+        """XXX"""
+    
+    def undoLog(first, last, filter=None):
+        """XXX"""
+    
+    def pack(t, referencesf):
+        """XXX"""
+
+class IVersioningStorage(IStorage):
+
+    def abortVersion(src, transaction):
+        """XXX"""
+    
+    def commitVersion(src, dest, transaction):
+        """XXX"""
+    
+    def modifiedInVersion(oid):
+        """XXX"""
+    
+    def versionEmpty(version):
+        """XXX"""
+    
+    def versions(max=None):
+        """XXX"""
+



More information about the Zodb-checkins mailing list