Commit 9bef0b58 authored by Jim Fulton's avatar Jim Fulton

Added support for loadSerial method, used for hysterical

access.
parent 4a43e943
...@@ -84,7 +84,7 @@ ...@@ -84,7 +84,7 @@
############################################################################## ##############################################################################
"""Network ZODB storage client """Network ZODB storage client
""" """
__version__='$Revision: 1.8 $'[11:-2] __version__='$Revision: 1.9 $'[11:-2]
import struct, time, os, socket, string, Sync, zrpc, ClientCache import struct, time, os, socket, string, Sync, zrpc, ClientCache
import tempfile, Invalidator, ExtensionClass, thread import tempfile, Invalidator, ExtensionClass, thread
...@@ -255,6 +255,11 @@ class ClientStorage(ExtensionClass.Base, BaseStorage.BaseStorage): ...@@ -255,6 +255,11 @@ class ClientStorage(ExtensionClass.Base, BaseStorage.BaseStorage):
self._lock_acquire() self._lock_acquire()
try: return self._call('history', oid, version, length) try: return self._call('history', oid, version, length)
finally: self._lock_release() finally: self._lock_release()
def loadSerial(self, oid, serial):
self._lock_acquire()
try: return self._call('loadSerial', oid, serial)
finally: self._lock_release()
def load(self, oid, version, _stuff=None): def load(self, oid, version, _stuff=None):
self._lock_acquire() self._lock_acquire()
......
...@@ -83,7 +83,7 @@ ...@@ -83,7 +83,7 @@
# #
############################################################################## ##############################################################################
__version__ = "$Revision: 1.8 $"[11:-2] __version__ = "$Revision: 1.9 $"[11:-2]
import asyncore, socket, string, sys, cPickle, os import asyncore, socket, string, sys, cPickle, os
from smac import SizedMessageAsyncConnection from smac import SizedMessageAsyncConnection
...@@ -188,7 +188,8 @@ class StorageServer(asyncore.dispatcher): ...@@ -188,7 +188,8 @@ class StorageServer(asyncore.dispatcher):
storage_methods={} storage_methods={}
for n in ( for n in (
'get_info', 'abortVersion', 'commitVersion', 'history', 'load', 'get_info', 'abortVersion', 'commitVersion',
'history', 'load', 'loadSerial',
'modifiedInVersion', 'new_oid', 'new_oids', 'pack', 'store', 'modifiedInVersion', 'new_oid', 'new_oids', 'pack', 'store',
'storea', 'tpc_abort', 'tpc_begin', 'tpc_begin_sync', 'storea', 'tpc_abort', 'tpc_begin', 'tpc_begin_sync',
'tpc_finish', 'undo', 'undoLog', 'undoInfo', 'versionEmpty', 'tpc_finish', 'undo', 'undoLog', 'undoInfo', 'versionEmpty',
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment