[EMAIL PROTECTED] wrote:
------- Additional Comments From [EMAIL PROTECTED] 2005-09-08 01:08 -------
I wonder if the new java.util.concurrent classes could be used instead
of simple HashMap?
http://java.sun.com/j2se/1.5.0/docs/api/java/util/concurrent/ConcurrentHashMap.html
but that would mean total dependence on j2se 1.5 and that would be a
problem for supporting j2se 1.4, though a backport is being worked on here
http://www.mathcs.emory.edu/dcl/util/backport-util-concurrent/
other reading here:
http://gee.cs.oswego.edu/dl/classes/EDU/oswego/cs/dl/util/concurrent/intro.html
I think that sort of thing would provide a nice solution for speed +
reliability. Using this as the underlaying base would/should fix issues with EL
access too.
This would be a bad solution, because there are too many writes in many
cases.
From what I see, the regular HashMap.get will return null without
further trouble (since that is all that is needed) as long as no resize
occurs. This makes the problem fixable by creating a non resizable
HashMap. Another possibility, which I consider very likely, is that
concurrent resizes are the only problem, and in that case syncing only
on writes is already enough.
Rémy
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]