Steve Ulrich wrote:
Julien Vermillard wrote
Thanks forgot ConcurrentHashMap :)
What's the methods you need ? putIfAbsent(K key, V value) perhaps ?
Yes, that's a good example when you want to fill an attribute on demand.
But maybe it's ok to let the user synchronize on a higher level and if you are
using an OrderedThreadPool, most of the possbile synchronisation issues are
gone.
Using a ConcurrentHashMap is covering any situation, at no cost (or
barely noticeable).
One thing we must keep in mind : MINA won't be a bottleneck in most of
the case. Squeezing a few nano seconds from core is probably a waste of
energy, compared to having a simple, powerful, documented API.
Not saying we must code like pigs, but my own experience with MINA in
Directory is that MINA count for less than 3% of the server's time when
heaviily loaded...
--
--
cordialement, regards,
Emmanuel Lécharny
www.iktek.com
directory.apache.org