Created
March 4, 2015 08:47
-
-
Save abhi-bit/49769d7e15877c262ebf to your computer and use it in GitHub Desktop.
Sync cas
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Set test key to cluster | |
client.set("test-key", "couchbase!").get(); | |
// Grab cas value | |
CASValue<Object> lock = client.gets("test-key"); | |
long cas_id = lock.getCas(); | |
client.cas("test-key", cas_id, "test-value"); | |
System.out.println((String) client.get("test-key")); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
woah! Thanks..:-)