[JCBC-61] Expose returned CAS value in CASResponse when available from binary protocol Created: 06/Jun/12  Updated: 25/Jun/13  Resolved: 25/Jun/13

Status: Resolved
Project: Couchbase Java Client
Component/s: Core
Affects Version/s: 1.1dp
Fix Version/s: 1.1.8
Security Level: Public

Type: Improvement Priority: Major
Reporter: Perry Krug Assignee: Michael Nitschinger
Resolution: Won't Fix Votes: 2
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Customer request to add the capability to retrieve new cas value after a cas() operation to avoid a subsequent gets()

Comment by Michael Nitschinger [ 29/Nov/12 ]
This may already be implemented, need to check.
Comment by Michael Nitschinger [ 25/Jun/13 ]
Hey, this is already the case when you use asyncCAS!

it returns an OperationFuture and this always has the getCas() method on it..

So this works:

    OperationFuture<Boolean> f = client.set("foo1", "bar");


    OperationFuture<CASResponse> f2 = client.asyncCAS("foo1", f.getCas(), "bar1");


Hope this helps,
Comment by Michael Nitschinger [ 25/Jun/13 ]
Already works with asyncCAS
Generated at Sat Nov 22 15:30:54 CST 2014 using JIRA 5.2.4#845-sha1:c9f4cc41abe72fb236945343a1f485c2c844dac9.