Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
ZODB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kirill Smelkov
ZODB
Commits
0f50675e
Commit
0f50675e
authored
Mar 11, 2004
by
Jeremy Hylton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add modified version of docstring from ZODB 4.
parent
5d3ccf8c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
49 additions
and
1 deletion
+49
-1
src/ZODB/BaseStorage.py
src/ZODB/BaseStorage.py
+49
-1
No files found.
src/ZODB/BaseStorage.py
View file @
0f50675e
...
...
@@ -13,7 +13,7 @@
##############################################################################
"""Handy standard storage machinery
$Id: BaseStorage.py,v 1.4
4 2004/02/27 00:31:53 faassen
Exp $
$Id: BaseStorage.py,v 1.4
5 2004/03/11 16:41:03 jeremy
Exp $
"""
import
cPickle
import
threading
...
...
@@ -28,6 +28,54 @@ from ZODB import POSException
from
ZODB.UndoLogCompatible
import
UndoLogCompatible
class
BaseStorage
(
UndoLogCompatible
):
"""Abstract base class that support storage implementations.
A subclass must define the following methods:
load()
close()
cleanup()
lastSerial()
lastTransaction()
It must override these hooks:
_begin()
_vote()
_abort()
_finish()
_clear_temp()
If it stores multiple revisions, it should implement
loadSerial()
loadBefore()
iterator()
If the subclass wants to implement undo, it should implement the
multiple revision methods and:
loadSerial()
undo()
undoInfo()
undoLog()
If the subclass wants to implement versions, it must implement:
abortVersion()
commitVersion()
modifiedInVersion()
versionEmpty()
versions()
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.
"""
_transaction
=
None
# Transaction that is being committed
_tstatus
=
' '
# Transaction status, used for copying data
_is_read_only
=
False
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment