I have an existing domain model which I would like not to change to work with Hazelcast. For this, I want to use StreamSerializer interface and Kryo. I have taken a look at https://github.com/hazelcast/hazelcast-book-examples/blob/master/chapter-serialization/kryo-serializer/src/main/java/PersonKryoSerializer.java example (or similar http://blog.hazelcast.com/2013/10/16/kryo-serializer/), but I wonder how to go ahead and add some more serializers for other classes.
Is it advisable to create a new StreamSerializer
class, again with the ThreadLocal
construct? This means, that again a new Kryo object will be created, is this ok? Or is it better to have only 1 Kryo
object in the whole application?
Some of the classes do not have default constructors, how do I fit that in?