Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to update TTL of a specific Aerospike record without using UDFs?

Tags:

java

aerospike

I have an application which needs to be able to point to any aerospike database based on the configuration file, from what I understand, using a UDF invovles the .lua file to be installed on the aerospike server in the first place which I cannot guarantee. Is there a simple way to update the metadata of a specific aerospike record using a Java client?

like image 732
fourbluecrayons Avatar asked Oct 23 '25 15:10

fourbluecrayons


1 Answers

You would use the touch operation to modify only the meta data:

http://www.aerospike.com/apidocs/java/com/aerospike/client/Operation.html#touch()

An example can be found here:

https://github.com/aerospike/aerospike-client-java/blob/master/examples/src/com/aerospike/examples/Touch.java

like image 152
kporter Avatar answered Oct 26 '25 15:10

kporter