logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gary Gregory <garydgreg...@gmail.com>
Subject Re: ThreadContextMap2
Date Sat, 20 Aug 2016 23:04:40 GMT
All right, topic closed for Map then. Since we have TCM2, now is the time
to add anything else. Check?

Gary

On Aug 20, 2016 3:05 PM, "Remko Popma" <remko.popma@gmail.com> wrote:

> I agree with Ralph.
>
> I am working on custom implementations of ThreadContextMap (LOG4J2-1010,
> LOG4J2-1447, LOG4J2-1349) and I'm very glad the interface is small.
>
> My rule of thumb for API design is YAGNI: don't add until you really need
> it, otherwise it'll get in the way.
>
> Remko
>
> Sent from my iPhone
>
> On 2016/08/21, at 4:59, Ralph Goers <ralph.goers@dslextreme.com> wrote:
>
> 1. Why?
> 2. Why do you need to implement equals and hashcode? What other map are
> you going to compare it with?
> 2. Which version? Java 8 added a bunch of new methods.
>
> I don’t really view the thread context map as a Map. It is really nothing
> more than a bunch of keys and values that I want to store that are probably
> not really directly related with each other, much like HTTP session
> attributes.  When there are cases of wanting to iterate through the whole
> map we first get a copy of it.
>
> Ralph
>
> On Aug 20, 2016, at 11:01 AM, Gary Gregory <garydgregory@gmail.com> wrote:
>
> Fair enough.
>
> I am wondering if there is a design reason not to implement Map now that
> we have the opportunity with the TCM2 interface. I'd take a crack at it.
>
> Gary
>
> On Aug 20, 2016 10:39 AM, "Ralph Goers" <ralph.goers@dslextreme.com>
> wrote:
>
>> Because Map has a lot more methods that weren’t needed and I didn’t want
>> to implement?
>>
>> Ralph
>>
>> On Aug 20, 2016, at 10:16 AM, Gary Gregory <garydgregory@gmail.com>
>> wrote:
>>
>> Hi All:
>>
>> Now that we have ThreadContextMap2:
>>
>> Why don't we do ThreadContextMap2 extends Map<String, String>?
>>
>> Why did ThreadContextMap initially not extends Map<String, String>?
>>
>> Gary
>>
>> --
>> E-Mail: garydgregory@gmail.com | ggregory@apache.org
>> Java Persistence with Hibernate, Second Edition
>> <http://www.manning.com/bauer3/>
>> JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
>> Spring Batch in Action <http://www.manning.com/templier/>
>> Blog: http://garygregory.wordpress.com
>> Home: http://garygregory.com/
>> Tweet! http://twitter.com/GaryGregory
>>
>>
>>
>

Mime
View raw message