mina-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emmanuel Lecharny <elecha...@apache.org>
Subject Re: [3.0] IoSession attachment no---signature
Date Mon, 26 Oct 2009 16:47:00 GMT
Julien Vermillard wrote:
> Le Mon, 26 Oct 2009 16:39:20 +0100,
> Steve Ulrich <steve.ulrich@proemion.com> a écrit :
>
>   
>>> Emmanuel Lecharny wrote:
>>>
>>> Julien Vermillard wrote:
>>>       
>>>> That's the idea for me.
>>>>
>>>> kill IoSessionAttributMap,
>>>> put a Synchronized HashMap in AbstractIoSession
>>>> and provide only : getAttribute, setAttribute, removeAttribute,
>>>> getAttributeKeys (could be renamed to getAttributeNames)
>>>>
>>>>         
>> Nitpick: A ConcurrentHashMap may have a better performance. ;-)
>> IMHO, the methods from the ConcurrentMap should be accessible, too.
>> But maybe I'm just too critical with thread safety concerns.
>>     
>
> Thanks forgot ConcurrentHashMap :)
> What's the methods you need ? putIfAbsent(K key, V value) perhaps ?
>   
No. Overkilling...
>  
>   
>>> We may add a listener attached to some attributes too, or to the
>>> session.
>>>       
>> That may justify an own Map implementation, but you should
>> redesign/clean that interface of the IoSessionAttributeMap (why do I
>> need to give a sessions to it, the implementation ignores it anyway?).
>>
>> Steve
>>     
>
> Well I'm not sure a listener on the attribute is a really useful
> feature. I can't thinks about a usecase.
>   
I was thinking that for debuggingpurpose it may help.

But we can start without it at first. Anyway, someone can extend the 
IoSession interface, adding the listener if needed.

-- 
--
cordialement, regards,
Emmanuel Lécharny
www.iktek.com
directory.apache.org



Mime
View raw message