|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.exolab.castor.persist.cache.AbstractBaseCache
Base implementation of all LRU cache types.
Constructor Summary | |
AbstractBaseCache()
|
Method Summary | |
abstract boolean |
contains(java.lang.Object key)
Indicates whether the cache holds value object mapped to the specified key. |
abstract java.util.Enumeration |
elements()
Returns an enumeration of the values in this LRU map. |
abstract void |
expire(java.lang.Object key)
Remove the object identified by key from the cache. |
abstract java.lang.Object |
get(java.lang.Object key)
Returns the value to which the specified key is mapped in this hashtable. |
java.lang.String |
getCacheType()
Indicates the type of this cache. |
int |
getCapacity()
Indicates the cache capacity. |
java.lang.String |
getClassName()
Indicates the class name of objects stored in this cache. |
abstract java.lang.Object |
put(java.lang.Object key,
java.lang.Object value)
Maps the specified key to the specified
value in this hashtable. |
abstract java.lang.Object |
remove(java.lang.Object key)
Removes the key (and its corresponding value) from this hashtable. |
void |
setCacheType(java.lang.String cacheType)
Sets the type of this cache instance. |
void |
setCapacity(int capacity)
Sets the cache capacity. |
void |
setClassName(java.lang.String className)
Sets the class name of objects cached here. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public AbstractBaseCache()
Method Detail |
public abstract java.lang.Object put(java.lang.Object key, java.lang.Object value)
key
to the specified
value
in this hashtable. Neither the key nor the
value can be null
.
The value can be retrieved by calling the get
method
with a key that is equal to the original key, before it is diposed
by the least-recently-used map.
put
in interface Cache
key
- the hashtable key.value
- the value.
null
if it did not have one.
java.lang.NullPointerException
- if the key or value is
null
.public abstract java.lang.Object get(java.lang.Object key)
get
in interface Cache
key
- - a key in the hashtable.
public abstract java.lang.Object remove(java.lang.Object key)
remove
in interface Cache
key
- the key that needs to be removed.
null
if the key did not have a mapping.public abstract java.util.Enumeration elements()
elements
in interface Cache
Enumeration
public abstract void expire(java.lang.Object key)
expire
in interface Cache
key
- the key that needs to be removed.public abstract boolean contains(java.lang.Object key)
contains
in interface Cache
key
- - A key identifying a value object.
public java.lang.String getCacheType()
getCacheType
in interface Cache
public void setCacheType(java.lang.String cacheType)
setCacheType
in interface Cache
cacheType
- the type of this cache.public int getCapacity()
getCapacity
in interface Cache
public void setCapacity(int capacity)
setCapacity
in interface Cache
capacity
- the cache capacity.public java.lang.String getClassName()
getClassName
in interface Cache
Cache.getClassName()
public void setClassName(java.lang.String className)
setClassName
in interface Cache
className
- The class name.Cache.setClassName(String)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |