You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@jakarta.apache.org by Ceki Gülcü <ce...@qos.ch> on 2004/10/27 17:46:35 UTC

LRU-Indentity-HashMap

Hello all,


In addressing bug #6229 [1], it transpired that we needed a bounded
hash map using LRU heuristics and identity to compute hashmap and
object references for equality. Basically, it would be a HashMap
merging the qualities of a LRUMap [2] and those of IdentityHashMap [3,
4, 5].

This HashMap will serve as a cache of previously parsed logging
messages of type java.lang.String. String has rather slow equals and
hash methods, hence the need for an IdentityMap. We need to keep the
memory footprint of the cache limited, hence the requirement for the
LRU heuristics.

It's a little 2 or 3 day project. If you are interested, please let me
know.

[1] http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16229
[2] 
http://jakarta.apache.org/commons/collections/apidocs-COLLECTIONS_3_1/org/apache/commons/collections/map/LRUMap.html
[3] http://java.sun.com/j2se/1.4.2/docs/api/java/util/IdentityHashMap.html
[4] 
http://ws.apache.org/axis/java/apiDocs/org/apache/axis/utils/IdentityHashMap.html
[5] 
http://jakarta.apache.org/commons/collections/apidocs-COLLECTIONS_3_1/org/apache/commons/collections/map/IdentityMap.html


ps: Please reply to log4j-dev@logging.apache.org.

-- 
Ceki Gülcü

      For log4j documentation consider "The complete log4j manual"
      http://www.qos.ch/shop/products/eclm/  



---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@jakarta.apache.org
For additional commands, e-mail: general-help@jakarta.apache.org