Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to change KryoFactory of request 4 to upgrade to 5 #918

Closed
JavaLionLi opened this issue Sep 28, 2022 · 6 comments
Closed

How to change KryoFactory of request 4 to upgrade to 5 #918

JavaLionLi opened this issue Sep 28, 2022 · 6 comments
Labels

Comments

@JavaLionLi
Copy link

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Provide a minimal reproducible example of the problem, ideally in the form of a runnable test-case.

Environment:

  • OS: [e.g. Ubuntu]
  • JDK Version: [e.g. 11]
  • Kryo Version: [e.g. 5.1.0]

Additional context
Add any other context about the problem here.

@theigl
Copy link
Collaborator

theigl commented Sep 28, 2022

I don't quite understand your question. For upgrade infos see #796.

@JavaLionLi
Copy link
Author

I don't quite understand your question. For upgrade infos see #796.

KryoFactory is 4. X code
How to upgrade 5. X for this class

@theigl
Copy link
Collaborator

theigl commented Sep 28, 2022

What is KryoFactory? What library are you using? Can you share some code?

@JavaLionLi
Copy link
Author

What is KryoFactory? What library are you using? Can you share some code?

image
Code of 4.0.2

@theigl
Copy link
Collaborator

theigl commented Sep 29, 2022

Ok, thanks.

Instead of KryoFactory, a pool is now created like this:

Pool<Kryo> kryoPool = new Pool<Kryo>(true, false, 8) {
   protected Kryo create () {
      Kryo kryo = new Kryo();
      // Configure the Kryo instance.
      return kryo;
   }
};

See https://github.com/EsotericSoftware/kryo#pooling

@JavaLionLi
Copy link
Author

thanks

thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants