loolek
January 15, 2014, 2:01pm
1
Hi!
Can I find any multi/bulk key incr method in the Java API, similar to these?
Perl: Multi version of “arithmetic”
incr_multi(@keys )
decr_multi(@keys )
incr_multi( [key, amount], … )
decr_multi( [key, amount], … )
JavaScript: Now changed to arithmeticMulti()
http://review.couchbase.org/#/c/30792/
ps:
I’v already opened a JIRA ticket around this issue -> if You don’t mind.
http://www.couchbase.com/issues/browse/JCBC-402
Cheers,
Loolek
daschl
February 7, 2014, 8:10am
2
You are right, those are currently not exposed. We will consider it for a future API enhancement, but I’m not sure how likely it is right now. You can just run your own loop and add them, this shouldn’t give you less performance.
loolek
February 7, 2014, 8:31am
3
Okay, thanks!
I was just wandering >>> because 1 OP is BETTER than 4 or 6 OP
Cheers,
Loolek
loolek
February 7, 2014, 8:38am
4
Daschl, in API level the “MultiIncrImpl” is just a hidden simple loop in the client driver?
Cheers,
Loolek
loolek
February 8, 2014, 2:23am
5
You can just run your own loop and add them, this shouldn’t give you less performance.
Okay, but than -> my problem will be AGAIN the atomicity
We have to be SURE about these looped INCR calls will work atomic…
So my question is:
Can I use any LOCK for these INCR calls (or who will care about the atomicity)?!
Thank You in Advance,
Loolek