BigBrotherBot v1.9.0
System Development Information for the BigBrotherBot project.

b3::lib::beaker::util::SyncDict Class Reference

Inheritance diagram for b3::lib::beaker::util::SyncDict:
b3::lib::beaker::util::WeakValuedRegistry

List of all members.

Public Member Functions

def __init__
def get
def sync_get
def has_key
def __contains__
def __getitem__
def __setitem__
def __delitem__
def clear

Public Attributes

 mutex
 dict

Private Member Functions

def _create

Detailed Description

An efficient/threadsafe singleton map algorithm, a.k.a.
"get a value based on this key, and create if not found or not
valid" paradigm:

    exists && isvalid ? get : create

Designed to work with weakref dictionaries to expect items
to asynchronously disappear from the dictionary.  

Use python 2.3.3 or greater !  a major bug was just fixed in Nov.
2003 that was driving me nuts with garbage collection/weakrefs in
this section.


Constructor & Destructor Documentation

def b3::lib::beaker::util::SyncDict::__init__ (   self)

Member Function Documentation

def b3::lib::beaker::util::SyncDict::__contains__ (   self,
  key 
)
def b3::lib::beaker::util::SyncDict::__delitem__ (   self,
  key 
)
def b3::lib::beaker::util::SyncDict::__getitem__ (   self,
  key 
)
def b3::lib::beaker::util::SyncDict::__setitem__ (   self,
  key,
  value 
)
def b3::lib::beaker::util::SyncDict::_create (   self,
  key,
  createfunc,
  args,
  kwargs 
) [private]
def b3::lib::beaker::util::SyncDict::clear (   self)
def b3::lib::beaker::util::SyncDict::get (   self,
  key,
  createfunc,
  args,
  kwargs 
)
def b3::lib::beaker::util::SyncDict::has_key (   self,
  key 
)
def b3::lib::beaker::util::SyncDict::sync_get (   self,
  key,
  createfunc,
  args,
  kwargs 
)

Member Data Documentation


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Properties