Module: Couchbase::Operations::Unlock
- Defined in:
- lib/couchbase/operations/unlock.rb
Instance Method Summary collapse
Instance Method Details
#async_unlock(key, options = {}) ⇒ Object
84 85 86 |
# File 'lib/couchbase/operations/unlock.rb', line 84 def async_unlock(key, = {}) end |
#unlock(key, options = {}) ⇒ true, false #unlock(keys) {|ret| ... } ⇒ Hash
Unlock key
The unlock
method allow you to unlock key once locked by Bucket#get with :lock
option.
75 76 77 78 79 80 81 82 |
# File 'lib/couchbase/operations/unlock.rb', line 75 def unlock(key, = {}) cas = .respond_to?(:to_hash) ? [:cas] : if client.unlock(key.to_s, cas) true else raise Couchbase::Error::TemporaryFail.new end end |