net.sf.jso.cache
Interface Cache

All Known Implementing Classes:
LRUCache, MemoryCache, PriorityCache

public interface Cache

Interface for caching management classes.


Method Summary
 java.lang.Object get(java.lang.Object key)
          Gets an object in the cache.
 CacheInfo getCacheInfo()
          Gets cache information.
 void invalidate()
          Invalidates all cached objects.
 java.lang.Object put(java.lang.Object key, java.lang.Object obj)
          Puts an object in the cache.
 

Method Detail

put

public java.lang.Object put(java.lang.Object key,
                            java.lang.Object obj)
Puts an object in the cache.

Parameters:
key - A key with which the specified object is to be associated.
obj - An object to be associated with the specified key.

get

public java.lang.Object get(java.lang.Object key)
Gets an object in the cache.

Parameters:
key - The key to which the object is associated.
Returns:
If an object associated with the supplied key is found this object is returned. Otherwise null is returned.

invalidate

public void invalidate()
Invalidates all cached objects.


getCacheInfo

public CacheInfo getCacheInfo()
Gets cache information.

Returns:
Information about the cache.