jason.core.cache
Class BasicCacheImpl

java.lang.Object
  |
  +--jason.core.cache.BasicCacheImpl
All Implemented Interfaces:
Cache

public class BasicCacheImpl
extends java.lang.Object
implements Cache

Created Fri May 10 14:20:00 2002

Comments


Constructor Summary
BasicCacheImpl()
           
 
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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasicCacheImpl

public BasicCacheImpl()
Method Detail

setCacheStrategy

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

Specified by:
setCacheStrategy in interface Cache

getCacheStrategy

public CacheStrategy getCacheStrategy()
Specified by:
getCacheStrategy in interface Cache
Returns:
the current cache strategy

storeObject

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

Specified by:
storeObject in interface 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.

Specified by:
restoreObject in interface 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

Specified by:
removeObject in interface Cache
Parameters:
key - the key object for removing