[Zodb-checkins] CVS: Packages/ZEO - StorageServer.py:1.21.4.3
jeremy@digicool.com
jeremy@digicool.com
Fri, 30 Mar 2001 17:55:24 -0500 (EST)
Update of /cvs-repository/Packages/ZEO
In directory korak:/tmp/cvs-serv5839
Modified Files:
Tag: ZEO-ZRPC-Dev
StorageServer.py
Log Message:
Delegate several calls to the storage
--- Updated File StorageServer.py in package Packages/ZEO --
--- StorageServer.py 2001/03/29 13:35:17 1.21.4.2
+++ StorageServer.py 2001/03/30 22:55:22 1.21.4.3
@@ -87,9 +87,20 @@
self.__storage_id = storage_id
self.__storage = storage
+ self.setup_delegation()
self.server.register(storage_id, self)
log("registered storage %s: %s" % (storage_id, storage))
+ def setup_delegation(self):
+ """Delegate several methods to the storage"""
+ self.undoInfo = self.__storage.undoInfo
+ self.undoLog = self.__storage.undoLog
+ self.versionEmpty = self.__storage.versionEmpty
+ self.versions = self.__storage.versions
+ self.history = self.__storage.history
+ self.load = self.__storage.load
+ self.loadSerial = self.__storage.loadSerial
+
def get_info(self):
return {
'length': len(self.__storage),
@@ -319,6 +330,7 @@
if n < 0:
n = 1
return map(lambda x, self=self: self.__storage.new_oid(), range(n))
+
def fixup_storage(storage):
# backwards compatibility hack