jason.core.cache
Interface Cache

All Known Implementing Classes:
BasicCacheImpl

public interface Cache

Here the cache interface for the JASon service. This cache is available in the ServiceContext objet

See Also:
CacheStrategy, CacheObject

Method Summary
 CacheStrategy getCacheStrategy()
           
 void removeObject(java.lang.Object key)
          Remove an object of the cache
 CacheObject restoreObject(java.lang.Object key)
          Retreive an object from the cache.
 void setCacheStrategy(CacheStrategy strategy)
          This is a delegate for deciding how to purge the cache
 void storeObject(java.lang.Object key, CacheObject object)
          Store an object in the cache
 

Method Detail

setCacheStrategy

public void setCacheStrategy(CacheStrategy strategy)
This is a delegate for deciding how to purge the cache


getCacheStrategy

public CacheStrategy getCacheStrategy()
Returns:
the current cache strategy

storeObject

public void storeObject(java.lang.Object key,
                        CacheObject object)
Store an object in the cache

Parameters:
key - the tied key with the cache object
object - the final object to restore

restoreObject

public CacheObject restoreObject(java.lang.Object key)
Retreive an object from the cache.

Returns:
null if the object is unknown or the good object

removeObject

public void removeObject(java.lang.Object key)
Remove an object of the cache

Parameters:
key - the key object for removing