org.apache.slide.util
Interface ObjectCache

All Known Implementing Classes:
AbstractObjectCache, ExtendedStore.TxCacheWrapper

public interface ObjectCache

Object cache interface.

Interface to an object cache to the objects manipulated by Slide. This includes :


The implementation of this interface is free to provide any kind of algorithm to limit cache size, like dropping LRU elements.

Version:
$Revision: 1.10 $ $Date: 2004/07/28 09:34:28 $

Method Summary
 void clear()
          Clear object cache.
 java.lang.Object get(java.lang.Object key)
          Get the object associated with the key.
 void put(java.lang.Object key, java.lang.Object value)
          Add an object to the cache, or overwrite its value.
 void remove(java.lang.Object key)
          Remove object associated with the given key.
 

Method Detail

get

public java.lang.Object get(java.lang.Object key)
Get the object associated with the key.

Parameters:
key - Object's key
Returns:
Object null if there is no object associated with that key in the cache, or the object value otherwise

put

public void put(java.lang.Object key,
                java.lang.Object value)
Add an object to the cache, or overwrite its value.

Parameters:
key - Object's key
value - Object's value

remove

public void remove(java.lang.Object key)
Remove object associated with the given key. Doesn't do anything if the key wasn't associated with any object.

Parameters:
key - Object's key

clear

public void clear()
Clear object cache.