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

b3::lib::beaker::container::AbstractDictionaryNSManager Class Reference

Inheritance diagram for b3::lib::beaker::container::AbstractDictionaryNSManager:
b3::lib::beaker::container::NamespaceManager b3::lib::beaker::container::MemoryNamespaceManager

List of all members.

Public Member Functions

def get_creation_lock
def __getitem__
def __contains__
def has_key
def __setitem__
def __delitem__
def do_remove
def keys

Detailed Description

A subclassable NamespaceManager that places data in a dictionary.

Subclasses should provide a "dictionary" attribute or descriptor
which returns a dict-like object.   The dictionary will store keys
that are local to the "namespace" attribute of this manager, so
ensure that the dictionary will not be used by any other namespace.


    import collections
    cached_data = collections.defaultdict(dict)
    class MyDictionaryManager(AbstractDictionaryNSManager):
        def __init__(self, namespace):
            AbstractDictionaryNSManager.__init__(self, namespace)
            self.dictionary = cached_data[self.namespace]
The above stores data in a global dictionary called "cached_data",
which is structured as a dictionary of dictionaries, keyed
first on namespace name to a sub-dictionary, then on actual
cache key to value.

Member Function Documentation

def b3::lib::beaker::container::AbstractDictionaryNSManager::__contains__ (   self,
def b3::lib::beaker::container::AbstractDictionaryNSManager::__delitem__ (   self,
def b3::lib::beaker::container::AbstractDictionaryNSManager::__getitem__ (   self,
def b3::lib::beaker::container::AbstractDictionaryNSManager::__setitem__ (   self,
def b3::lib::beaker::container::AbstractDictionaryNSManager::do_remove (   self)
def b3::lib::beaker::container::AbstractDictionaryNSManager::get_creation_lock (   self,
def b3::lib::beaker::container::AbstractDictionaryNSManager::has_key (   self,
def b3::lib::beaker::container::AbstractDictionaryNSManager::keys (   self)

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