Couchbase
  • Why NoSQL?
  • Couchbase Server
  • Download
  • Resources
  • Careers
Home | Forums | SDKs | SDKs

Java Multi CAS update

3 replies [Last post]
  • Login or register to post comments
Mon, 08/08/2011 - 17:44
MarcusLongmuir
Offline
Joined: 08/08/2011
Groups: None

I'm saving thousands of values that require CAS for consistency. How efficient is it to just perform:

CASResponse casr = client.cas("someKey", casvalue, "new string value");
CASResponse casr = client.cas("someKey2", casvalue, "new string value2");
CASResponse casr = client.cas("someKey3", casvalue, "new string value3");

Or is there a method I can use to do a multiple CAS?

Thanks

Top
  • Login or register to post comments
Thu, 08/11/2011 - 16:42
mikew
Offline
Joined: 03/14/2011
Groups:

Sorry there is no muli-cas support. We only support multi-gets. Sending individual cas messages will still be high performance, It will just take up slightly more bandwidth due to having a header for each transaction.

Top
  • Login or register to post comments
Thu, 08/11/2011 - 16:46
MarcusLongmuir
Offline
Joined: 08/08/2011
Groups: None

What would be the best method to use for a large number concurrently?

Thanks

Top
  • Login or register to post comments
Fri, 08/12/2011 - 11:03
mikew
Offline
Joined: 03/14/2011
Groups:

The cas() function you are calling is a blocking function. There is a function called asyncCas() which is a non-blocking function and returns a Future. This way you can do a bunch of cas operations and then check to make sure they succeeded later.

Top
  • Login or register to post comments
  • Login or register to post comments
  • Login
  • Register

Company

  • About Us
  • Leadership
  • Customers
  • Partners
  • Contact Us

Product

  • Couchbase Server
  • Couchbase SDKs
  • Use Cases
  • Documentation
  • Forums

Open Source

  • Couchbase Project
  • Couchbase vs. CouchDB

Commercial

  • Subscriptions & Support
  • Training & Services

News

  • Blog
  • Newsletter
  • Press Releases
  • Buzz

Follow Us

    
  • Customer Login
  • Terms of Service
  • Privacy Policy
  • Trademark Policy
  • Site Map

© 2013 COUCHBASE All rights reserved.

Sign in to Couchbase Community

close
  • Create new account
  • Request new password
You are logging into the Forums, Wiki and Issue Tracker