本文整理汇总了Python中couchbase._libcouchbase.Connection.unlock方法的典型用法代码示例。如果您正苦于以下问题:Python Connection.unlock方法的具体用法?Python Connection.unlock怎么用?Python Connection.unlock使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类couchbase._libcouchbase.Connection
的用法示例。
在下文中一共展示了Connection.unlock方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: unlock
# 需要导入模块: from couchbase._libcouchbase import Connection [as 别名]
# 或者: from couchbase._libcouchbase.Connection import unlock [as 别名]
def unlock(self, key, cas):
"""Unlock a Locked Key in Couchbase.
:param key: The key to unlock
:param cas: The cas returned from
:meth:`lock`'s :class:`Result` object.
Unlock a previously-locked key in Couchbase. A key is
locked by a call to :meth:`lock`.
See :meth:`lock` for an example.
:raise: :exc:`couchbase.exceptions.KeyExistsError` if the CAS
supplied does not match the CAS on the server (possibly because
it was unlocked by previous call).
.. seealso::
:meth:`lock`
:meth:`unlock_multi`
"""
return _Base.unlock(self, key, cas=cas)