Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Optimistic locking in aerospike java

Tags:

java

aerospike

I was looking at example where one can take lock of a row in aerospike. Documents mentioned below says that it has support but can't find example form same.Can anybody please share method(s) which support these

Reference: https://docs.aerospike.com/display/V3/Key-Value+Store

like image 901
ManMohan Vyas Avatar asked Feb 11 '23 01:02

ManMohan Vyas


1 Answers

You could do this by setting the appropriate attributes in the WritePolicy. For example, for our Java client, you can check the details here:

http://www.aerospike.com/apidocs/java/com/aerospike/client/policy/WritePolicy.html

You want to look at GenerationPolicy:

http://www.aerospike.com/apidocs/java/com/aerospike/client/policy/GenerationPolicy.html

Also note that our documentation has been updated and is now under http://www.aerospike.com/docs

like image 58
Meher Avatar answered Feb 13 '23 06:02

Meher