public class ConcurrentLRUCache<K,V> extends Object
Modifier and Type | Class and Description |
---|---|
static interface |
ConcurrentLRUCache.EvictionListener<K,V> |
static class |
ConcurrentLRUCache.Stats |
Constructor and Description |
---|
ConcurrentLRUCache(int size,
int lowerWatermark) |
ConcurrentLRUCache(int upperWaterMark,
int lowerWaterMark,
int acceptableWatermark,
int initialSize,
boolean runCleanupThread,
boolean runNewThreadForCleanup,
ConcurrentLRUCache.EvictionListener<K,V> evictionListener) |
Modifier and Type | Method and Description |
---|---|
void |
clear() |
void |
destroy() |
protected void |
finalize() |
V |
get(K key) |
Map<K,V> |
getLatestAccessedItems(int n) |
Map<Object,org.apache.solr.util.ConcurrentLRUCache.CacheEntry<K,V>> |
getMap() |
Map<K,V> |
getOldestAccessedItems(int n)
Returns 'n' number of oldest accessed entries present in this cache.
|
ConcurrentLRUCache.Stats |
getStats() |
V |
put(K key,
V val) |
V |
remove(K key) |
void |
setAlive(boolean live) |
int |
size() |
public ConcurrentLRUCache(int upperWaterMark, int lowerWaterMark, int acceptableWatermark, int initialSize, boolean runCleanupThread, boolean runNewThreadForCleanup, ConcurrentLRUCache.EvictionListener<K,V> evictionListener)
public ConcurrentLRUCache(int size, int lowerWatermark)
public void setAlive(boolean live)
public Map<K,V> getOldestAccessedItems(int n)
n
- the number of oldest items neededpublic int size()
public void clear()
public void destroy()
public ConcurrentLRUCache.Stats getStats()
Copyright © 2000-2014 Apache Software Foundation. All Rights Reserved.