List of usage examples for org.apache.commons.collections.map LRUMap LRUMap
public LRUMap(Map map, boolean scanUntilRemovable)
From source file:org.lockss.crawler.CrawlManagerStatus.java
/** Return an LRUMap that prevents deletion of active crawls */ static LRUMap makeLRUMap(int histSize) { // scanUntilRemovable must be true to prevent map from slowly growing // without bound return new LRUMap(histSize, true) { protected boolean removeLRU(AbstractLinkedMap.LinkEntry entry) { return !((CrawlerStatus) entry.getValue()).isCrawlActive(); }//from www . ja v a2 s . co m }; }