class documentation
class ParamServerCache(object):
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 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 |
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
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.