aerospike / aerospike-client-java

Aerospike Java Client Library
Other
236 stars 212 forks source link

Add query.PredExp implement java.io.Serializable interface #95

Closed ghost closed 6 years ago

ghost commented 6 years ago

Given that it doesn't make sense to have AerospikeClient implement Serializable interface, adding the components that can allow rebuilding the client on another hosts, should implement Serializable interface. The first step is to make query.PredExp implement Serializable interface.

BrianNichols commented 6 years ago

PredExp seems a bit arbitrary, but it's complex enough that implementing serializable internally may provide benefit without application code side effects. We will support this (along with serialVersionUID declaration) in the next java client release.

ghost commented 6 years ago

oh cool! That sounds wonderful. Given that it directly impacts the project I am working on, I am happy to work on the patch myself. I understand that the choice of PredExp may sound arbitrary, do you have any suggestions to fix it in a more elegant way?

BrianNichols commented 6 years ago

The PredExp changes with serialVersionUID declaration has already been implemented. I don't think there is a more elegant way.

BrianNichols commented 6 years ago

Java client 4.1.4 makes PredExp serializable.

https://www.aerospike.com/download/client/java/4.1.4/

ghost commented 6 years ago

Awesome, thank you