Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
ZEO
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
ZEO
Commits
665be5a1
Commit
665be5a1
authored
Mar 16, 2004
by
Jeremy Hylton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Restore epydoc markup using rST variant.
parent
a6432213
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
14 deletions
+36
-14
src/ZODB/DB.py
src/ZODB/DB.py
+36
-14
No files found.
src/ZODB/DB.py
View file @
665be5a1
...
...
@@ -13,7 +13,7 @@
##############################################################################
"""Database objects
$Id: DB.py,v 1.7
0 2004/03/04 22:41:50 jim
Exp $"""
$Id: DB.py,v 1.7
1 2004/03/16 16:28:19 jeremy
Exp $"""
import
cPickle
,
cStringIO
,
sys
from
thread
import
allocate_lock
...
...
@@ -28,6 +28,7 @@ from zLOG import LOG, ERROR
class
DB
(
object
):
"""The Object Database
-------------------
The DB class coordinates the activities of multiple database
Connection instances. Most of the work is done by the
...
...
@@ -47,6 +48,28 @@ class DB(object):
The database provides a few methods intended for application code
-- open, close, undo, and pack -- and a large collection of
methods for inspecting the database and its connections' caches.
:Cvariables:
- `klass`: Class used by L{open} to create database connections
:Groups:
- `User Methods`: __init__, open, close, undo, pack, classFactory
- `Inspection Methods`: getName, getSize, objectCount,
getActivityMonitor, setActivityMonitor
- `Connection Pool Methods`: getPoolSize, getVersionPoolSize,
removeVersionPool, setPoolSize, setVersionPoolSize
- `Transaction Methods`: invalidate
- `Other Methods`: lastTransaction, connectionDebugInfo
- `Version Methods`: modifiedInVersion, abortVersion, commitVersion,
versionEmpty
- `Cache Inspection Methods`: cacheDetail, cacheExtremeDetail,
cacheFullSweep, cacheLastGCTime, cacheMinimize, cacheMeanAge,
cacheMeanDeac, cacheMeanDeal, cacheSize, cacheDetailSize,
getCacheSize, getVersionCacheSize, setCacheSize, setVersionCacheSize,
cacheStatistics
- `Deprecated Methods`: getCacheDeactivateAfter,
setCacheDeactivateAfter,
getVersionCacheDeactivateAfter, setVersionCacheDeactivateAfter
"""
klass
=
Connection
# Class to use for connections
...
...
@@ -62,17 +85,15 @@ class DB(object):
):
"""Create an object database.
The constructor requires one argument, the storage used by the
database, e.g. FileStorage.
There are several other optional arguments:
pool_size: maximum number of open connections
cache_size: target size of Connection object cache
cache_deactivate_after: ignored
version_pool_size: maximum number of connections (per version)
version_cache_size: target size of Connection object cache for
:Parameters:
- `storage`: the storage used by the database, e.g. FileStorage
- `pool_size`: maximum number of open connections
- `cache_size`: target size of Connection object cache
- `cache_deactivate_after`: ignored
- `version_pool_size`: maximum number of connections (per version)
- `version_cache_size`: target size of Connection object cache for
version connections
version_cache_deactivate_after
: ignored
- `version_cache_deactivate_after`
: ignored
"""
# Allocate locks:
l
=
allocate_lock
()
...
...
@@ -602,9 +623,10 @@ class DB(object):
or undoInfo(). The value of id is not the same as a
transaction id used by other methods; it is unique to undo().
In addition, a user can pass the optional argument,
transaction, which identifies a transaction context to use for
the undo().
:Parameters:
- `id`: a storage-specific transaction identifier
- `transaction`: transaction context to use for undo().
By default, uses the current transaction.
"""
if
transaction
is
None
:
transaction
=
get_transaction
()
...
...
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