Reputation: 5513
By using Kryo 3 one create a Kryo 3 instance every time one serializes / deserializes the root object (a stream).
I wonder what reuse concept I can use.
From the source it looks like a Kryo instance might be only used in a single thread fashion and since it uses refrence it is really ment to be recreated every time unless one uses a resolver being able to reset.
Is there a way to clone a Kryo instance configuring it only once and reuse everywhere? You know like configure by example... .
Upvotes: 0
Views: 1159
Reputation: 69
kryo is not thread safe (https://github.com/EsotericSoftware/kryo#pooling-kryo-instances). you can use kryo pooling like what i did: https://github.com/mykidong/kryo-pool-example
Upvotes: 3