public abstract class GenericCache extends java.lang.Object implements Cache, java.io.Serializable
Cache interface.Cache,
CacheLRU,
CacheFIFO,
CacheFIFO2,
CacheRandom,
Serialized Form| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_CAPACITY
The default capacity to be used by the GenericCache subclasses
provided with this package.
|
| Modifier and Type | Method and Description |
|---|---|
abstract void |
addElement(java.lang.Object key,
java.lang.Object value) |
int |
capacity()
Returns the maximum number of elements that can be cached at one time.
|
java.lang.Object |
getElement(java.lang.Object key) |
boolean |
isFull() |
java.util.Iterator |
keys() |
int |
size()
Returns the number of elements in the cache, not to be confused with
the
capacity() which returns the number
of elements that can be held in the cache at one time. |
public static final int DEFAULT_CAPACITY
public abstract void addElement(java.lang.Object key,
java.lang.Object value)
addElement in interface Cachepublic java.lang.Object getElement(java.lang.Object key)
getElement in interface Cachepublic final java.util.Iterator keys()
public final int size()
capacity() which returns the number
of elements that can be held in the cache at one time.
public final int capacity()
public final boolean isFull()
Copyright ? 2000-2003 Apache Software Foundation. All Rights Reserved.