[Zodb-checkins] CVS: ZODB3/ZODB - BaseStorage.py:1.24.2.1.2.1

Jeremy Hylton jeremy@zope.com
Fri, 1 Nov 2002 14:19:43 -0500


Update of /cvs-repository/ZODB3/ZODB
In directory cvs.zope.org:/tmp/cvs-serv20389/ZODB

Modified Files:
      Tag: ZODB3-deadlock-debug-branch
	BaseStorage.py 
Log Message:
Add default sortKey() implementation that works for FileStorage.



=== ZODB3/ZODB/BaseStorage.py 1.24.2.1 => 1.24.2.1.2.1 ===
--- ZODB3/ZODB/BaseStorage.py:1.24.2.1	Mon Oct 21 11:15:55 2002
+++ ZODB3/ZODB/BaseStorage.py	Fri Nov  1 14:19:42 2002
@@ -63,6 +63,15 @@
     def close(self):
         pass
 
+    def sortKey(self):
+        """Return a string that can be used to sort storage instances.
+
+        The key must uniquely identify a storage and must be the same
+        across multiple instantiations of the same storage.
+        """
+        # name may not be sufficient, e.g. ZEO has a user-definable name.
+        return self.__name__
+
     def getName(self):
         return self.__name__