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