0

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... .

Martin Kersten
  • 5,127
  • 8
  • 46
  • 77

1 Answers1

2

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

mykidong
  • 51
  • 6