commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aaron Smuts <ASm...@therealm.com>
Subject RE: [Collections] subclassing LRUMap
Date Thu, 14 Feb 2002 21:26:48 GMT
You need a special removal for overflow since you don't want to spoll normal
removals to disk.  The LRU implementation in stratum allows you to do this.

> -----Original Message-----
> From: Morgan Delagrange [mailto:mdelagra@yahoo.com]
> Sent: Thursday, February 14, 2002 4:13 PM
> To: Jakarta Commons Developers
> Subject: [Collections] subclassing LRUMap
> 
> Hi all,
> 
> I just made a backward-compatible change to LRUMap to facilitate
> subclassing.  Now, you can override removeLRU() if you want to manipulate
> (e.g. persist to disk) an Object before it is automatically removed from
> the
> Map.  You can also subclass remove(Object) if you want to manipulate all
> Objects before they are removed, whether or not they are being removed by
> the LRU algorithm.
> 
> This seemed like a pretty reasonable thing to do, but I wanted to drop a
> note to the list since it enhances the contract of LRUMap.  Let me know if
> you object to the idea or the approach.
> 
> I also added a couple of unit tests (TestLRUMap.java) that confirm the
> ability of subclasses to control Object removal.
> 
> - Morgan
> 
> 
> _________________________________________________________
> Do You Yahoo!?
> Get your free @yahoo.com address at http://mail.yahoo.com
> 
> 
> --
> To unsubscribe, e-mail:   <mailto:commons-dev-
> unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:commons-dev-
> help@jakarta.apache.org>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message