How to change the serializer/deserializer to be used by Aerospike?

619 Views Asked by At

I am using java client of aerospike. I wish to change the serializer that aerospike uses for java objects i.e. java serializer.
I intend to use other faster serialization libraries e.g. PROTOSTUFF/AVRO.

How do i set my custom serializer for use by aerospike client.

I am also using Spring in my project (if that can help in anyway).

Also, point me to some benchmarks (if available) for different serializers used with aerospike client.

1

There are 1 best solutions below

0
sunil On

For all the non-native data types (of aerospike), Aerospike Java client depends on Serializable interface to serialise the Java object. So, you can wrap your object/data in a custom class which implements the Serializable interface. You can call your preferred encoder/decoder from that custom class.