Implement allocation-friendly method to get user count in SimpUserRegistry [SPR-14930] #19497
Comments
Juergen Hoeller commented Looks good to me :-) |
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
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
The text was updated successfully, but these errors were encountered: