org.apache.oro.util
Interface Cache
- CacheFIFO, CacheFIFO2, CacheLRU, CacheRandom, GenericCache
An interface defining the basic functions of a cache.
void | addElement(Object key, Object value)
|
int | capacity() - Returns the maximum number of elements that can be cached at one time.
|
Object | getElement(Object key)
|
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.
|
addElement
public void addElement(Object key,
Object value)
capacity
public int capacity()
Returns the maximum number of elements that can be cached at one time.
- The maximum number of elements that can be cached at one time.
getElement
public Object getElement(Object key)
size
public 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.
- The current size of the cache (i.e., the number of elements
currently cached).
Copyright B) 2000-2003 Apache Software Foundation. All Rights Reserved.