[Zope3-checkins] CVS: Zope3/src/zodb/zeo - client.py:1.2.4.1 server.py:1.3.4.1 stubs.py:1.2.4.1

Jeremy Hylton jeremy@zope.com
Thu, 23 Jan 2003 11:58:46 -0500


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

Modified Files:
      Tag: new-pickle-branch
	client.py server.py stubs.py 
Log Message:
Add getVersion() and setVersion() to storage API.


=== Zope3/src/zodb/zeo/client.py 1.2 => 1.2.4.1 ===
--- Zope3/src/zodb/zeo/client.py:1.2	Wed Dec 25 09:12:22 2002
+++ Zope3/src/zodb/zeo/client.py	Thu Jan 23 11:58:43 2003
@@ -453,6 +453,14 @@
         """
         return self._is_read_only
 
+    # XXX version should really be part of _info
+
+    def getVersion(self):
+        return self._server.getVersion()
+
+    def setVersion(self, version):
+        self._server.setVersion(version)
+
     def _check_trans(self, trans):
         """Internal helper to check a transaction argument for sanity."""
         if self._is_read_only:


=== Zope3/src/zodb/zeo/server.py 1.3 => 1.3.4.1 ===
--- Zope3/src/zodb/zeo/server.py:1.3	Mon Dec 30 11:29:23 2002
+++ Zope3/src/zodb/zeo/server.py	Thu Jan 23 11:58:43 2003
@@ -237,6 +237,8 @@
 
     def setup_delegation(self):
         """Delegate several methods to the storage"""
+        self.getVersion = self.storage.getVersion
+        self.setVersion = self.storage.setVersion
         self.versionEmpty = self.storage.versionEmpty
         self.versions = self.storage.versions
         self.history = self.storage.history


=== Zope3/src/zodb/zeo/stubs.py 1.2 => 1.2.4.1 ===
--- Zope3/src/zodb/zeo/stubs.py:1.2	Wed Dec 25 09:12:22 2002
+++ Zope3/src/zodb/zeo/stubs.py	Thu Jan 23 11:58:43 2003
@@ -11,10 +11,9 @@
 # FOR A PARTICULAR PURPOSE
 #
 ##############################################################################
-"""RPC stubs for interface exported by ClientStorage."""
+"""RPC stubs for client and server interfaces."""
 
 class ClientStorage:
-
     """An RPC stub class for the interface exported by ClientStorage.
 
     This is the interface presented by ClientStorage to the
@@ -61,11 +60,7 @@
     def info(self, arg):
         self.rpc.callAsync('info', arg)
 
-
-"""RPC stubs for interface exported by StorageServer."""
-
 class StorageServer:
-
     """An RPC stub class for the interface exported by ClientStorage.
 
     This is the interface presented by the StorageServer to the
@@ -98,6 +93,12 @@
 
     def register(self, storage_name, read_only):
         self.rpc.call('register', storage_name, read_only)
+
+    def getVersion(self):
+        return self.rpc.call('getVersion')
+
+    def setVersion(self, version):
+        self.rpc.callAsync('setVersion', version)
 
     def get_info(self):
         return self.rpc.call('get_info')