本文整理汇总了Python中couchbase._libcouchbase.Connection._rget方法的典型用法代码示例。如果您正苦于以下问题:Python Connection._rget方法的具体用法?Python Connection._rget怎么用?Python Connection._rget使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类couchbase._libcouchbase.Connection
的用法示例。
在下文中一共展示了Connection._rget方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: rget
# 需要导入模块: from couchbase._libcouchbase import Connection [as 别名]
# 或者: from couchbase._libcouchbase.Connection import _rget [as 别名]
def rget(self, key, replica_index=None, quiet=None):
"""
Get a key from a replica
:param string key: The key to fetch
:param int replica_index: The replica index to fetch.
If this is ``None`` then this method will return once any replica
responds. Use :attr:`configured_replica_count` to figure out the
upper bound for this parameter.
The value for this parameter must be a number between 0 and the
value of :attr:`configured_replica_count`-1.
:param boolean quiet: Whether to suppress errors when the key is not
found
This function (if `replica_index` is not supplied) functions like
the :meth:`get` method that has been passed the `replica` parameter::
c.get(key, replica=True)
.. seealso::
:meth:`get` :meth:`rget_multi`
"""
if replica_index is not None:
return _Base._rgetix(self, key, replica=replica_index, quiet=quiet)
else:
return _Base._rget(self, key, quiet=quiet)