Module: Couchbase::Operations::Unlock
- Defined in:
- lib/couchbase/operations/unlock.rb
Instance Method Summary collapse
Instance Method Details
#async_unlock(key, options = {}) ⇒ Object
67 68 69 |
# File 'lib/couchbase/operations/unlock.rb', line 67 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.
58 59 60 61 62 63 64 65 |
# File 'lib/couchbase/operations/unlock.rb', line 58 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 |