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

Fully-static EntityInfoHandler #323

Merged
merged 10 commits into from
Mar 18, 2024
Merged

Fully-static EntityInfoHandler #323

merged 10 commits into from
Mar 18, 2024

Conversation

ajkyffin
Copy link
Contributor

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.

@ajkyffin ajkyffin requested a review from patrick-austin March 14, 2024 15:51
Copy link
Contributor

@patrick-austin patrick-austin left a 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.

Copy link
Contributor

@patrick-austin patrick-austin left a 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.

@ajkyffin ajkyffin merged commit c855f7f into master Mar 18, 2024
2 checks passed
@ajkyffin ajkyffin deleted the entity-info-handler-static branch March 18, 2024 16:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants