Table of Contents

Class: DB Zope-2.2.1-src/lib/python/ZODB/DB.py

The Object Database

The Object database coordinates access to and interaction of one or more connections, which manage object spaces. Most of the actual work of managing objects is done by the connections.

Base Classes   
UndoLogCompatible.UndoLogCompatible
Methods   
__init__
_cacheMean
_classFactory
_closeConnection
_connectionMap
abortVersion
cacheDetail
cacheExtremeDetail
cacheFullSweep
cacheLastGCTime
cacheMeanAge
cacheMeanDeac
cacheMeanDeal
cacheMinimize
cacheSize
cacheStatistics
close
commitVersion
connectionDebugInfo
exportFile
getCacheDeactivateAfter
getCacheSize
getName
getPoolSize
getSize
getVersionCacheDeactivateAfter
getVersionCacheSize
getVersionPoolSize
importFile
invalidate
invalidateMany
modifiedInVersion
objectCount
open
pack
setCacheDeactivateAfter
setCacheSize
setClassFactory
setPoolSize
setVersionCacheDeactivateAfter
setVersionCacheSize
setVersionPoolSize
  __init__ 
__init__ (
        self,
        storage,
        pool_size=7,
        cache_size=400,
        cache_deactivate_after=60,
        version_pool_size=3,
        version_cache_size=100,
        version_cache_deactivate_after=10,
        )

Create an object database.

The storage for the object database must be passed in. Optional arguments are:

pool_size

The size of the pool of object spaces.

  _cacheMean 
_cacheMean ( self,  attr )

  _classFactory 
_classFactory (
        self,
        connection,
        location,
        name,
        _silly=( '__doc__', ),
        _globals={},
        )

  _closeConnection 
_closeConnection ( self,  connection )

Return a connection to the pool

  _connectionMap 
_connectionMap ( self,  f )

  abortVersion 
abortVersion ( self,  version )

  cacheDetail 
cacheDetail ( self )

Return information on objects in the various caches

Organized by class.

  cacheExtremeDetail 
cacheExtremeDetail ( self )

  cacheFullSweep 
cacheFullSweep ( self,  value )

  cacheLastGCTime 
cacheLastGCTime ( self )

  cacheMeanAge 
cacheMeanAge ( self )

  cacheMeanDeac 
cacheMeanDeac ( self )

  cacheMeanDeal 
cacheMeanDeal ( self )

  cacheMinimize 
cacheMinimize ( self,  value )

  cacheSize 
cacheSize ( self )

  cacheStatistics 
cacheStatistics ( self )

  close 
close ( self )

  commitVersion 
commitVersion (
        self,
        source,
        destination='',
        )

  connectionDebugInfo 
connectionDebugInfo ( self )

  exportFile 
exportFile (
        self,
        oid,
        file=None,
        )

Exceptions   
'Not yet implemented'
  getCacheDeactivateAfter 
getCacheDeactivateAfter ( self )

  getCacheSize 
getCacheSize ( self )

  getName 
getName ( self )

  getPoolSize 
getPoolSize ( self )

  getSize 
getSize ( self )

  getVersionCacheDeactivateAfter 
getVersionCacheDeactivateAfter ( self )

  getVersionCacheSize 
getVersionCacheSize ( self )

  getVersionPoolSize 
getVersionPoolSize ( self )

  importFile 
importFile ( self,  file )

Exceptions   
'Not yet implemented'
  invalidate 
invalidate (
        self,
        oid,
        connection=None,
        version='',
        rc=sys.getrefcount,
        )

Invalidate references to a given oid.

This is used to indicate that one of the connections has committed a change to the object. The connection commiting the change should be passed in to prevent useless (but harmless) messages to the connection.

  invalidateMany 
invalidateMany (
        self,
        oids=None,
        version='',
        )

  modifiedInVersion 
modifiedInVersion ( self,  oid )

  objectCount 
objectCount ( self )

  open 
open (
        self,
        version='',
        transaction=None,
        temporary=0,
        force=None,
        waitflag=1,
        )

Return a object space (AKA connection) to work in

The optional version argument can be used to specify that a version connection is desired.

The optional transaction argument can be provided to cause the connection to be automatically closed when a transaction is terminated. In addition, connections per transaction are reused, if possible.

Note that the connection pool is managed as a stack, to increate the likelihood that the connection's stack will include useful objects.

Exceptions   
POSException.Unimplemented
  pack 
pack ( self,  t )

  setCacheDeactivateAfter 
setCacheDeactivateAfter ( self,  v )

  setCacheSize 
setCacheSize ( self,  v )

  setClassFactory 
setClassFactory ( self,  factory )

  setPoolSize 
setPoolSize ( self,  v )

  setVersionCacheDeactivateAfter 
setVersionCacheDeactivateAfter ( self,  v )

  setVersionCacheSize 
setVersionCacheSize ( self,  v )

  setVersionPoolSize 
setVersionPoolSize ( self,  v )

  undo 
undo ( self,  id )

  versionEmpty 
versionEmpty ( self,  version )


Table of Contents

This document was automatically generated on Mon Sep 4 07:33:06 2000 by HappyDoc version r0_6