commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "christopher marshall" <oxbow_la...@hotmail.com>
Subject SoftRefHashMap isn't a pure implementation of Map - I'd like to contribute one
Date Fri, 17 May 2002 11:03:57 GMT
All -

Again you may have to excuse my naivety. The 
org.apache.common.collections.SoftRefHashMap is not a "pure" implementation 
of the java.util.Map interface, because the collections returned by the 
"values()" and "entrySet()" methods are not backed by the underlying Map. I 
also believe that the SoftRefHashMap is flawed as keys will not be 
automatically be reclaimed when their value-referents are cleared - the user 
has to manually invoke the purge() method.

I have written an implementation of Map (SoftValueHashMap) which is a pure 
implementation of the java.util.Map interface and which purges itw own keys 
automatically. Also it has a getIfAbsentPut(Object key, ObjectFactory fac) 
method, which is very useful for cache-ing purposes (it is unlikely that a 
Cache will want to return "null" just because an underlying value has been 
de-referenced etc).

I wish to contribute this code to Apache Commons Collections and have been 
looking on the Apache site to see how this is done by a new developer. 
Unforunately I can't find the information. Could someone please tell me the 
etiquette to be followed (presumably I email my source code to an "Admitter" 
who puts it in the nightly-release CVS repository.

Thanks in advance,

Chris Marshall


_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.


--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message