org.exolab.castor.persist.cache
public interface Cache
Version: $Revision: 1.5 $ $Date: 2005/08/04 07:31:15 $
Method Summary | |
---|---|
void | clear()
Removes all mappings from this map.
|
void | close()
Life-cycle method to allow custom resource cleanup for a cache implementation |
boolean | contains(Object key)
Indicates whether the cache holds value object mapped to the specified
key.
|
boolean | containsKey(Object key)
Returns true if this map contains a mapping for the specified key
|
boolean | containsValue(Object value)
Returns true if this map maps one or more keys to the specified value.
|
Enumeration | elements()
Returns an enumeration of the values in this LRU map. |
Set | entrySet()
Returns a set view of the keys contained in this map.
|
void | expire(Object key)
Remove the object identified by key from the cache.
|
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. |
void | initialize()
Lyfe-cycle method to allow custom initialization of cache implementations |
boolean | isEmpty()
Returns true if this map contains no key-value mappings.
|
Set | keySet()
Returns a collection view of the values contained in this map.
|
Object | put(Object key, Object value)
Maps the specified key to the specified value
in this hashtable. |
void | putAll(Map aMap)
Copies all of the mappings from the specified map to this map (optional
operation).
|
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. |
int | size()
Returns the number of key-value mappings in this map.
|
Collection | values() |
Throws: MethodNotImplementedException
Parameters: key A key identifying a value object.
Returns: True if the cache holds a value object for the specified key, false otherwise.
Parameters: key A key object.
Returns: true if this map contains a mapping for the specified key
Throws: MethodNotImplementedException
Parameters: value The object value.
Returns: true if this map maps one or more keys to the specified value
Throws: MethodNotImplementedException
Returns: an enumeration of the values in this hashtable.
See Also: java.util.Enumeration
Returns: A set view of all the keys.
Throws: MethodNotImplementedException
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.
Returns: True if this map contains no key-value mappings
Throws: MethodNotImplementedException
Returns: A set view of all the value objects.
Throws: MethodNotImplementedException
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: aMap The map to be copied.
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.
Throws: MethodNotImplementedException
Returns:
Throws: MethodNotImplementedException