Commit 06b839ae authored by Jim Fulton's avatar Jim Fulton

Added a Conection sync method that can be used to synchronize the

connection with the stored data.  This is handy when multiple
threads or processes are accessing and updating data simultaneously
(e.g. When using the monitor client to poke at a running Zope process).
parent 506733d9
...@@ -84,8 +84,8 @@ ...@@ -84,8 +84,8 @@
############################################################################## ##############################################################################
"""Database connection support """Database connection support
$Id: Connection.py,v 1.9 1999/06/24 19:33:12 jim Exp $""" $Id: Connection.py,v 1.10 1999/06/24 20:05:50 jim Exp $"""
__version__='$Revision: 1.9 $'[11:-2] __version__='$Revision: 1.10 $'[11:-2]
from cPickleCache import PickleCache from cPickleCache import PickleCache
from POSException import ConflictError, ExportError from POSException import ConflictError, ExportError
...@@ -386,6 +386,11 @@ class Connection(ExportImport.ExportImport): ...@@ -386,6 +386,11 @@ class Connection(ExportImport.ExportImport):
invalidate=self._db.invalidate invalidate=self._db.invalidate
for oid in self._invalidating: invalidate(oid, self) for oid in self._invalidating: invalidate(oid, self)
def sync(self):
get_transaction().abort()
self._cache.invalidate(self._invalidated)
class tConnection(Connection): class tConnection(Connection):
def close(self): def close(self):
......
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