org.apache.lucene.util.cache
Class SimpleLRUCache<K,V>

java.lang.Object
  extended by org.apache.lucene.util.cache.Cache<K,V>
      extended by org.apache.lucene.util.cache.SimpleMapCache<K,V>
          extended by org.apache.lucene.util.cache.SimpleLRUCache<K,V>
All Implemented Interfaces:
Closeable

public class SimpleLRUCache<K,V>
extends SimpleMapCache<K,V>

Simple LRU cache implementation that uses a LinkedHashMap. This cache is not synchronized, use Cache.synchronizedCache(Cache) if needed.


Field Summary
 
Fields inherited from class org.apache.lucene.util.cache.SimpleMapCache
map
 
Constructor Summary
SimpleLRUCache(int cacheSize)
          Creates a last-recently-used cache with the specified size.
 
Method Summary
 
Methods inherited from class org.apache.lucene.util.cache.SimpleMapCache
close, containsKey, get, keySet, put
 
Methods inherited from class org.apache.lucene.util.cache.Cache
synchronizedCache
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleLRUCache

public SimpleLRUCache(int cacheSize)
Creates a last-recently-used cache with the specified size.



Copyright © 2000-2010 Apache Software Foundation. All Rights Reserved.