|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ro.isdc.wro.cache.impl.MemoryCacheStrategy<K,V> ro.isdc.wro.cache.impl.LruMemoryCacheStrategy<K,V>
public class LruMemoryCacheStrategy<K,V>
This class implements a LRU (Least Recently Used) cache strategy. This cache must have a fixed-size. When new entries are added and the cache reach its maximum capacity, eldest entries are removed.
As all MemoryCacheStrategy
s this cache is thread-safe.
Field Summary | |
---|---|
static String |
ALIAS
Aliased used by provider for this implementation |
static int |
DEFAULT_SIZE
Default cache size if no capacity is specified by the constructor. |
Constructor Summary | |
---|---|
LruMemoryCacheStrategy()
Constructs a LruMemoryCacheStrategy and sets the default size up
to DEFAULT_SIZE |
|
LruMemoryCacheStrategy(int cacheSize)
Constructs a new LruMemoryCacheStrategy and sets the cache size. |
Method Summary |
---|
Methods inherited from class ro.isdc.wro.cache.impl.MemoryCacheStrategy |
---|
clear, destroy, get, put |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String ALIAS
public static final int DEFAULT_SIZE
Constructor Detail |
---|
public LruMemoryCacheStrategy()
LruMemoryCacheStrategy
and sets the default size up
to DEFAULT_SIZE
public LruMemoryCacheStrategy(int cacheSize)
LruMemoryCacheStrategy
and sets the cache size.
cacheSize
- Cache size. It must be greater than 0.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |