[PATCH 0/2] Class- and class loader-local storage (Bug ID #6493635)
Bob Lee
openjdk at crazybob.org
Sat Feb 28 01:09:03 UTC 2009
David,
I regret making my suggestion in the first place. I really think we need
ephemerons, but for the sake of discussion:
- Your patch adds 2 new classes. My suggestion adds one method (maybe 2 for
convenience).
- Your approach enables explicit clearing, but I thought the whole point of
adding this extension was to avoid explicit clearing. If you're going to
explicitly clear, why do you need this functionality at all? If we want to
support circular dependencies between class loaders, we should pursue
ephemerons because your solution requires explicit clearing whereas
ephemerons would not.
- Say for example that I need a static map from Class to List<Method> (some
filtered list of methods in Class). Your patch requires one WeakHashMap per
Class. My suggestion requires only one map total and one lightweight data
structure per ClassLoader.
- Your patch forces users to use your data structure. My suggestion enables
users to use whatever data structure they like. Your patch introduces a
point of contention between completely orthogonal libraries. Mine introduces
almost none (assuming you implement the internal data structure in a
non-locking fashion).
Bob
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/core-libs-dev/attachments/20090227/8f9b6474/attachment.html>
More information about the core-libs-dev
mailing list