Uploaded image for project: 'Couchbase Java Client'
  1. Couchbase Java Client
  2. JCBC-61

Expose returned CAS value in CASResponse when available from binary protocol

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: 1.1dp
    • Fix Version/s: 1.1.8
    • Component/s: Core
    • Security Level: Public
    • Labels:
      None
    • Sprint:
      Sprint 1 - CW 19 & 20

      Description

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

      No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

        Hide
        daschl Michael Nitschinger added a comment -

        Already works with asyncCAS

        Show
        daschl Michael Nitschinger added a comment - Already works with asyncCAS
        Hide
        daschl Michael Nitschinger added a comment -

        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");

        System.out.println(f.getCas());

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

        System.out.println(f2.getCas());

        Hope this helps,
        Michael

        Show
        daschl Michael Nitschinger added a comment - 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"); System.out.println(f.getCas()); OperationFuture<CASResponse> f2 = client.asyncCAS("foo1", f.getCas(), "bar1"); System.out.println(f2.getCas()); Hope this helps, Michael
        Hide
        daschl Michael Nitschinger added a comment -

        This may already be implemented, need to check.

        Show
        daschl Michael Nitschinger added a comment - This may already be implemented, need to check.

          People

          • Assignee:
            daschl Michael Nitschinger
            Reporter:
            perry Perry Krug
          • Votes:
            2 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Agile

                Gerrit Reviews

                There are no open Gerrit changes