Search:

Search all manuals
Search this manual
Manual
Couchbase Client Library: Java 1.1
Community Wiki and Resources
Download Client Library
JavaDoc
Couchbase Developer Guide 2.0
Couchbase Server Manual 2.0
Java Client Library
SDK Forum
Wiki: Java Client Library
Additional Resources
Community Wiki
Community Forums
Couchbase SDKs
Parent Section
7 Retrieve Operations
Chapter Sections
Chapters

7.7. Unlock

API Callclient.unlock(key, casunique)
Asynchronousno
Description Unlock a previously locked key by providing the corresponding CAS value that was returned during the lock
ReturnsBoolean ( Boolean (true/false) )
Arguments 
String key Document ID used to identify the value
long casunique Unique value used to verify a key/value combination
Exceptions 
InterruptedException Interrupted Exception while waiting for value.
OperationTimeoutException Exception timeout occured while waiting for value.
RuntimeException Exception object specifying interruption while waiting for value.
CASValue<Object> casv = client.getAndLock("keyA", 3);
//Use CAS Value to Unlock
client.unlock("getunltest", casv.getCas());