class documentation

class ParamServerCache(object):

View In Hierarchy

Cache of values on the parameter server. Implementation is just a thread-safe dictionary.

Method __init__ Undocumented
Method delete Undocumented
Method get @param key: parameter key @type key: str @return: Current value for parameter @raise: KeyError
Method set Set the value of the parameter in the cache. This is a prerequisite of calling update(). @param key: parameter key @type key: str @param value: parameter value @type value: str
Method set_notifier Notifier implements any parameter subscription logic. The notifier should be a function that takes in a key and value that represents a parameter update. Notifier is called under lock and thus must not implement any lengthy computation.
Method update Update the value of the parameter in the cache @param key: parameter key @type key: str @param value: parameter value @type value: str @raise: KeyError if key is not already in the cache.
Instance Variable d Undocumented
Instance Variable lock Undocumented
Instance Variable notifier Undocumented
def __init__(self):

Undocumented

def delete(self, key):

Undocumented

def get(self, key):

@param key: parameter key @type key: str @return: Current value for parameter @raise: KeyError

def set(self, key, value):

Set the value of the parameter in the cache. This is a prerequisite of calling update(). @param key: parameter key @type key: str @param value: parameter value @type value: str

def set_notifier(self, notifier):

Notifier implements any parameter subscription logic. The notifier should be a function that takes in a key and value that represents a parameter update. Notifier is called under lock and thus must not implement any lengthy computation.

def update(self, key, value):

Update the value of the parameter in the cache @param key: parameter key @type key: str @param value: parameter value @type value: str @raise: KeyError if key is not already in the cache.

d =

Undocumented

lock =

Undocumented

notifier =

Undocumented