Commit b0bc5f9c authored by Jeremy Hylton's avatar Jeremy Hylton

Restore epydoc markup using rST variant.

parent 64a3242f
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
############################################################################## ##############################################################################
"""Database objects """Database objects
$Id: DB.py,v 1.70 2004/03/04 22:41:50 jim Exp $""" $Id: DB.py,v 1.71 2004/03/16 16:28:19 jeremy Exp $"""
import cPickle, cStringIO, sys import cPickle, cStringIO, sys
from thread import allocate_lock from thread import allocate_lock
...@@ -28,6 +28,7 @@ from zLOG import LOG, ERROR ...@@ -28,6 +28,7 @@ from zLOG import LOG, ERROR
class DB(object): class DB(object):
"""The Object Database """The Object Database
-------------------
The DB class coordinates the activities of multiple database The DB class coordinates the activities of multiple database
Connection instances. Most of the work is done by the Connection instances. Most of the work is done by the
...@@ -47,6 +48,28 @@ class DB(object): ...@@ -47,6 +48,28 @@ class DB(object):
The database provides a few methods intended for application code The database provides a few methods intended for application code
-- open, close, undo, and pack -- and a large collection of -- open, close, undo, and pack -- and a large collection of
methods for inspecting the database and its connections' caches. 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 klass = Connection # Class to use for connections
...@@ -62,17 +85,15 @@ class DB(object): ...@@ -62,17 +85,15 @@ class DB(object):
): ):
"""Create an object database. """Create an object database.
The constructor requires one argument, the storage used by the :Parameters:
database, e.g. FileStorage. - `storage`: the storage used by the database, e.g. FileStorage
- `pool_size`: maximum number of open connections
There are several other optional arguments: - `cache_size`: target size of Connection object cache
pool_size: maximum number of open connections - `cache_deactivate_after`: ignored
cache_size: target size of Connection object cache - `version_pool_size`: maximum number of connections (per version)
cache_deactivate_after: ignored - `version_cache_size`: target size of Connection object cache for
version_pool_size: maximum number of connections (per version)
version_cache_size: target size of Connection object cache for
version connections version connections
version_cache_deactivate_after: ignored - `version_cache_deactivate_after`: ignored
""" """
# Allocate locks: # Allocate locks:
l=allocate_lock() l=allocate_lock()
...@@ -602,9 +623,10 @@ class DB(object): ...@@ -602,9 +623,10 @@ class DB(object):
or undoInfo(). The value of id is not the same as a or undoInfo(). The value of id is not the same as a
transaction id used by other methods; it is unique to undo(). transaction id used by other methods; it is unique to undo().
In addition, a user can pass the optional argument, :Parameters:
transaction, which identifies a transaction context to use for - `id`: a storage-specific transaction identifier
the undo(). - `transaction`: transaction context to use for undo().
By default, uses the current transaction.
""" """
if transaction is None: if transaction is None:
transaction = get_transaction() transaction = get_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