-
Notifications
You must be signed in to change notification settings - Fork 5
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
Fully-static EntityInfoHandler #323
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only found one thing, should work fine as is but wanted to check whether we can remove the (potentially redundant) HashSet
, or not.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the explanation.
In order to remove synchronized blocks, the PrivateEntityInfo instances are created during class static initialization and stored in immutable objects, making the class fully thread-safe.
Since everything is available in static variables, there is no need to instantiate the class, so all the methods are made static.