On Thu, 14 Feb 2002, Morgan Delagrange wrote: > 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.
Actually, I just object to the implementation of LRUMap itself. Many of its operations have O(n) cost when they could be O(1). I haven't taken a good look at the changes you've made, but it doesn't look like you've fixed that. :) I'll try to take a closer look at what you've changed when I have a few spare cycles (possibly not until this weekend). I don't know if you saw these other messages talking about LRUMap (there's more, I just selected a couple): http://www.mail-archive.com/[email protected]/msg02555.html http://www.mail-archive.com/[email protected]/msg03084.html Oh, and since you seem to have an active interest in collections (no one else seems to), maybe you could review the patches I've submitted that have not yet been applied? http://www.mail-archive.com/[email protected]/msg03055.html http://www.mail-archive.com/[email protected]/msg03056.html http://www.mail-archive.com/[email protected]/msg03057.html http://www.mail-archive.com/[email protected]/msg03060.html I was planning on "fixing" LRUMap once the SequencedHashMap patch was applied. I also plan on adding a ton of test cases as well (for all Map implementations). I mentioned that here: http://www.mail-archive.com/[email protected]/msg03054.html I've got quite a few done, but its not nearly as complete as I'd like. regards, michael -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
