Return-Path: X-Original-To: apmail-commons-issues-archive@minotaur.apache.org Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C918799B2 for ; Wed, 15 May 2013 21:05:17 +0000 (UTC) Received: (qmail 99063 invoked by uid 500); 15 May 2013 21:05:17 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 98937 invoked by uid 500); 15 May 2013 21:05:17 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 98908 invoked by uid 99); 15 May 2013 21:05:17 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 15 May 2013 21:05:17 +0000 Date: Wed, 15 May 2013 21:05:17 +0000 (UTC) From: "Thomas Neidhart (JIRA)" To: issues@commons.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (COLLECTIONS-395) Request for UnBoundedLRUMap implementation with extra get method MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/COLLECTIONS-395?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13658817#comment-13658817 ] Thomas Neidhart commented on COLLECTIONS-395: --------------------------------------------- Something that I do not fully understand: what is the purpose of an *unbounded* LRU map? The idea normally is to evict the LRU items when the map gets full. Is it more like the mentioned LinkedHashMap where the iteration order is altered based on the access statistics? > Request for UnBoundedLRUMap implementation with extra get method > ---------------------------------------------------------------- > > Key: COLLECTIONS-395 > URL: https://issues.apache.org/jira/browse/COLLECTIONS-395 > Project: Commons Collections > Issue Type: Wish > Components: Map > Affects Versions: Nightly Builds > Reporter: David Hawthorne > Priority: Minor > Fix For: 4.x > > > I've created an UnBoundedLRUMap implementation (based off of BoundedLRUMap) using the svn tree at version 3.3, and this has come in so handy that it makes sense to suggest it to the masters in charge of the collections framework. > One tweak I made to the copy we're using is an extra get method that takes two arguments: key and boolean. The boolean determines whether or not the MRU item is updated, so we can make requests into the map that do *not* affect order. This is sometimes necessary in real world environments where you do not want a data structure with LRU-only accesses. > This implementation would solve the main problem we have with using the jdk's LinkedHashMap LRU implementation. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira