org.exolab.castor.persist.cache
public abstract class AbstractBaseCache extends Object implements Cache
Method Summary | |
---|---|
abstract void | close() |
abstract boolean | contains(Object key)
Indicates whether the cache holds value object mapped to the specified key. |
protected void | dispose(Object obj)
This method is called when an object is disposed.
|
abstract Enumeration | elements()
Returns an enumeration of the values in this LRU map.
|
void | expire(Object key)
Remove the object identified by key from the cache.
|
abstract Object | get(Object key)
Returns the value to which the specified key is mapped in this hashtable. |
String | getCacheType()
Indicates the type of this cache. |
int | getCapacity()
Indicates the cache capacity. |
String | getClassName()
Indicates the class name of objects stored in this cache. |
protected Object | invokeMethod(Object target, String name, Class[] argumentTypes, Object[] arguments) |
protected boolean | invokeMethodReturnBoolean(Object target, String name, Class[] argumentTypes, Object[] arguments) |
protected int | invokeMethodReturnInt(Object target, String name, Class[] argumentTypes, Object[] arguments) |
protected Object | invokeMethodWithExceptions(Object target, String name, Class[] argumentTypes, Object[] arguments) |
protected Object | invokeStaticMethodWithExceptions(Class target, String name, Class[] argumentTypes, Object[] arguments) |
abstract Object | put(Object key, Object value)
Maps the specified key to the specified
value in this hashtable. |
abstract Object | remove(Object key)
Removes the key (and its corresponding value) from this
hashtable. |
void | setCacheType(String cacheType)
Sets the type of this cache instance. |
void | setCapacity(int capacity)
Sets the cache capacity. |
void | setClassName(String className)
Sets the class name of objects cached here. |
See Also: close
Parameters: key - A key identifying a value object.
Returns: True if the cache holds a value object for the specified key, false otherwise.
Parameters: o - the disposed object
Returns: an enumeration of the values in this hashtable.
See Also: java.util.Enumeration
Parameters: key the key that needs to be removed.
Parameters: key - a key in the hashtable.
Returns: the value to which the key is mapped in this hashtable; null if the key is not mapped to any value in this hashtable.
Returns: the cache type.
Returns: the cache capacity.
Returns: The class name.
See Also: getClassName
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.
Parameters: key the hashtable key. value the value.
Returns: the previous value of the specified key in this hashtable,
or null
if it did not have one.
Throws: NullPointerException if the key or value is
null
.
Parameters: key the key that needs to be removed.
Returns: the value to which the key had been mapped in this hashtable,
or null
if the key did not have a mapping.
Parameters: cacheType the type of this cache.
Parameters: capacity the cache capacity.
Parameters: className The class name.
See Also: setClassName