java.io.Serializable
, Cache
public final class CacheFIFO2 extends GenericCache
GenericCache
,
Serialized FormDEFAULT_CAPACITY
Constructor | Description |
---|---|
CacheFIFO2() |
Same as:
|
CacheFIFO2(int capacity) |
Creates a CacheFIFO2 instance with a given cache capacity.
|
Modifier and Type | Method | Description |
---|---|---|
void |
addElement(java.lang.Object key,
java.lang.Object value) |
Adds a value to the cache.
|
java.lang.Object |
getElement(java.lang.Object key) |
capacity, isFull, keys, size
public CacheFIFO2(int capacity)
capacity
- The capacity of the cache.public CacheFIFO2()
CacheFIFO2(GenericCache.DEFAULT_CAPACITY);
public java.lang.Object getElement(java.lang.Object key)
getElement
in interface Cache
getElement
in class GenericCache
public final void addElement(java.lang.Object key, java.lang.Object value)
addElement
in interface Cache
addElement
in class GenericCache
key
- The key referencing the value added to the cache.value
- The value to add to the cache.Copyright ? 2000-2003 Apache Software Foundation. All Rights Reserved.