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

Implement allocation-friendly method to get user count in SimpUserRegistry [SPR-14930] #19497

Closed
spring-projects-issues opened this issue Nov 21, 2016 · 2 comments
Assignees
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

@spring-projects-issues spring-projects-issues commented Nov 21, 2016

Christoph Dreis opened SPR-14930 and commented

Hey,

in my application I implemented a method to get the currently connected user count backed by the implementations of the SimpUserRegistry interface, which is used for monitoring purposes. Unfortunately, this involves creating a completely new HashSet every time.

What about an additional method to just get the user count in a more allocation-friendly manner? Much like Method.getParameterCount() in Java 8.

Attached you will find my proposal, but if I missed something feel free to adjust it accordingly.

Cheers,
Christoph


Affects: 4.3.4

Reference URL: #1241

@spring-projects-issues
Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented Nov 21, 2016

Juergen Hoeller commented

Looks good to me :-)

@spring-projects-issues
Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented Nov 21, 2016

Christoph Dreis commented

Wow, that was fast. Thank you :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.