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:[EMAIL PROTECTED]]
> 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-
> [EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:commons-dev-
> [EMAIL PROTECTED]>

Reply via email to