public abstract class GenericCache extends Object implements Cache, Serializable
Cache interface.Cache,
CacheLRU,
CacheFIFO,
CacheFIFO2,
CacheRandom,
序列化表格| 限定符和类型 | 字段和说明 |
|---|---|
static int |
DEFAULT_CAPACITY
The default capacity to be used by the GenericCache subclasses
provided with this package.
|
| 限定符和类型 | 方法和说明 |
|---|---|
abstract 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) |
boolean |
isFull() |
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(Object key, Object value)
addElement 在接口中 Cachepublic Object getElement(Object key)
getElement 在接口中 Cachepublic final 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 © 2023. All rights reserved.