Java Multi CAS update
Mon, 08/08/2011 - 17:44
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
Thu, 08/11/2011 - 16:46
What would be the best method to use for a large number concurrently?
Thanks
Fri, 08/12/2011 - 11:03
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.
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.