Commit a4e47054 authored by Barry Warsaw's avatar Barry Warsaw

tpc_vote(), _vote(): Removed, the BaseStorage base class implements

the infrastructure.
parent 2ff975f6
......@@ -22,9 +22,10 @@ from bsddb3 import db
# BaseStorage provides primitives for lock acquisition and release,
# abortVersion(), commitVersion() and a host of other methods, some of which
# are overridden here, some of which are not.
from ZODB import POSException
from ZODB.BaseStorage import BaseStorage
# $Revision: 1.3 $
# $Revision: 1.4 $
__version__ = '0.1'
......@@ -147,21 +148,6 @@ class BerkeleyBase(BaseStorage):
# TBD: this is expensive to calculate and many not be necessary.
return 0
def tpc_vote(self, transaction):
# BAW: This wrapper framework should probably be in BaseStorage's
# tpc_vote()
if transaction is not self._transaction:
raise POSException.StorageTransactionError(self, transaction)
self._lock_acquire()
try:
self._vote(transaction)
finally:
self._lock_release()
def _vote(self, transaction):
pass
def _finish(self, tid, user, desc, ext):
"""Called from BaseStorage.tpc_finish(), this commits the underlying
BSDDB transaction.
......
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