5.6.3.1. vlcp.service.kvdb.objectdb¶
Note
This document is generated from the source file.
Created on 2016/3/24
author: | hubo |
---|
-
class
vlcp.service.kvdb.objectdb.
ObjectDB
(server)¶ Abstract transaction layer for KVDB
-
__init__
(server)¶ Constructor
-
get
(key, requestid, nostale=False)¶ Get an object from specified key, and manage the object. Return a reference to the object or None if not exists.
-
getonce
(key, nostale=False)¶ Get a object without manage it. Return a copy of the object, or None if not exists. Referenced objects are not retrieved.
-
load
(container)¶ Load module
-
mget
(keys, requestid, nostale=False)¶ Get multiple objects and manage them. Return references to the objects.
-
mgetonce
(keys, nostale=False)¶ Get multiple objects, return copies of them. Referenced objects are not retrieved.
-
munwatch
(keys, requestid)¶ Cancel management of keys
-
mwatch
(keys, requestid, nostale=False)¶ Try to return all the references, see
watch()
-
transact
(keys, updater, withtime=False)¶ Try to update keys in a transact, with an
updater(keys, values)
, which returns(updated_keys, updated_values)
.The updater may be called more than once. If
withtime = True
, the updater should take three parameters:(keys, values, timestamp)
with timestamp as the server time
-
unload
(container, force=False)¶ Unload module
-
unwatch
(key, requestid)¶ Cancel management of a key
-
unwatchall
(requestid)¶ Cancel management for all keys that are managed by requestid
-
walk
(keys, walkerdict, requestid, nostale=False)¶ Recursively retrieve keys with customized functions. walkerdict is a dictionary
key->walker(key, obj, walk, save)
.
-
watch
(key, requestid, nostale=False)¶ Try to find an object and return a reference. Use
reference.isdeleted()
to test whether the object exists. Usereference.wait(container)
to wait for the object to be existed.
-
watchlist
(requestid=None)¶ Return a dictionary whose keys are database keys, and values are lists of request ids. Optionally filtered by request id
-
-
class
vlcp.service.kvdb.objectdb.
RetrieveReply
(*args, **kwargs)¶
-
class
vlcp.service.kvdb.objectdb.
RetrieveRequestSend
(*args, **kwargs)¶