org.eclipse.higgins.cache.api
Interface ICache

All Known Implementing Classes:
NOCache

public interface ICache

Author:
Alexander Yuhimenko

Method Summary
 void clear()
          remove all objects from cache
 Object get(ICacheKey key)
           
 boolean isKeyInCache(ICacheKey key)
           
 void put(ICacheKey key, Object value)
          Put object
 void remove(ICacheKey key)
          If object exist remove it
 void update(ICacheKey key, Object value)
          Update or put object.
 

Method Detail

get

public Object get(ICacheKey key)
           throws CacheException
Parameters:
key -
Returns:
object or null
Throws:
CacheException

put

public void put(ICacheKey key,
                Object value)
         throws CacheException
Put object

Parameters:
key -
value -
Throws:
CacheException

update

public void update(ICacheKey key,
                   Object value)
            throws CacheException
Update or put object.

Parameters:
key -
value -
Throws:
CacheException

remove

public void remove(ICacheKey key)
            throws CacheException
If object exist remove it

Parameters:
key -
Throws:
CacheException

clear

public void clear()
           throws CacheException
remove all objects from cache

Throws:
CacheException

isKeyInCache

public boolean isKeyInCache(ICacheKey key)
                     throws CacheException
Parameters:
key -
Returns:
true if object exist else false
Throws:
CacheException