Base class that supports storage implementations.
XXX Base classes like this are an attractive nuisance. They often introduce more complexity than they save. While important logic is implemented here, we should consider exposing it as utility functions or as objects that can be used through composition.
A subclass must define the following methods: load() store() close() cleanup() lastTransaction()
It must override these hooks: _begin() _vote() _abort() _finish() _clear_temp()
If it stores multiple revisions, it should implement loadSerial() loadBefore()
Each storage will have two locks that are accessed via lock acquire and release methods bound to the instance. (Yuck.) _lock_acquire / _lock_release (reentrant) _commit_lock_acquire / _commit_lock_release
The commit lock is acquired in tpc_begin() and released in tpc_abort() and tpc_finish(). It is never acquired with the other lock held.
The other lock appears to protect _oid and _transaction and perhaps other things. It is always held when load() is called, so presumably the load() implementation should also acquire the lock.
There are no implemented interfaces.
There are no attributes in this class.
copyTransactionsFrom(other, verbose=0)
Copy transactions from another storage.
This is typically used for converting data from one storage to another. `other` must have an .iterator() method.
getName()
getSize()
getTid(oid)
history(oid, version, length=1, filter=None)
isReadOnly()
loadBefore(oid, tid)
Return most recent revision of oid before tid committed.
loadSerial(oid, serial)
new_oid()
registerDB(db)
set_max_oid(possible_new_max_oid)
sortKey()
Return a string that can be used to sort storage instances.
The key must uniquely identify a storage and must be the same across multiple instantiations of the same storage.
tpc_abort(transaction)
tpc_begin(transaction, tid=None, status=' ')
tpc_finish(transaction, f=None)
tpc_transaction()
tpc_vote(transaction)
undoInfo(first=0, last=-20, specification=None)