Class
ZODB.BaseStorage.BaseStorage

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.

Base classes

Implemented Interfaces

There are no implemented interfaces.

Attributes/Properties

There are no attributes in this class.

Methods

Known Subclasses