类 GenericCache
java.lang.Object
org.apache.oro.util.GenericCache
- 所有已实现的接口:
Serializable,Cache
- 直接已知子类:
CacheFIFO,CacheFIFO2,CacheLRU,CacheRandom
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.- 从以下版本开始:
- 1.0
- 版本:
- ,
- 另请参阅:
-
字段概要
字段修饰符和类型字段说明static final intThe default capacity to be used by the GenericCache subclasses provided with this package. -
方法概要
修饰符和类型方法说明abstract voidaddElement(Object key, Object value) final intcapacity()Returns the maximum number of elements that can be cached at one time.getElement(Object key) final booleanisFull()final Iteratorkeys()final intsize()Returns the number of elements in the cache, not to be confused with thecapacity()which returns the number of elements that can be held in the cache at one time.
-
字段详细资料
-
DEFAULT_CAPACITY
public static final int DEFAULT_CAPACITYThe default capacity to be used by the GenericCache subclasses provided with this package. Its value is 20.- 另请参阅:
-
-
方法详细资料
-
addElement
- 指定者:
addElement在接口中Cache
-
getElement
- 指定者:
getElement在接口中Cache
-
keys
-
size
public final int size()Returns the number of elements in the cache, not to be confused with thecapacity()which returns the number of elements that can be held in the cache at one time. -
capacity
public final int capacity()Returns the maximum number of elements that can be cached at one time. -
isFull
public final boolean isFull()
-