|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.oro.util.GenericCache
This is the base class for all cache implementations provided in the
org.apache.oro.util package. To derive a subclass from GenericCache
only the ... methods
need be overridden.
Although 4 subclasses of GenericCache are provided with this
package, users may not derive subclasses from this class.
Rather, users should create their own implmentations of the
Cache
interface.
Cache
,
CacheLRU
,
CacheFIFO
,
CacheFIFO2
,
CacheRandom
,
Serialized FormField Summary | |
static int |
DEFAULT_CAPACITY
The default capacity to be used by the GenericCache subclasses provided with this package. |
Method Summary | |
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. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int DEFAULT_CAPACITY
Method Detail |
public abstract void addElement(java.lang.Object key, java.lang.Object value)
addElement
in interface Cache
public java.lang.Object getElement(java.lang.Object key)
getElement
in interface Cache
public 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.
size
in interface Cache
public final int capacity()
capacity
in interface Cache
public final boolean isFull()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |