| com.whirlycott.cache.Cache
Cache | public interface Cache (Code) | | Defines a simple interface that all caches should implement.
author: phil |
Method Summary | |
public void | clear() Clear the cache. | public V | remove(K key) Remove an object from the cache.
Parameters: key - key associated with object to remove. | public V | retrieve(K key) Retrieve an object from the cache.
Parameters: key - key associated with desired object. | public int | size() Get the current size of the cache. | public void | store(K key, V value) Store an object in the cache. | public void | store(K key, V value, long expireTime) Store an object in the cache. |
clear | public void clear()(Code) | | Clear the cache.
|
remove | public V remove(K key)(Code) | | Remove an object from the cache.
Parameters: key - key associated with object to remove. object that was removed. |
retrieve | public V retrieve(K key)(Code) | | Retrieve an object from the cache.
Parameters: key - key associated with desired object. object identified by provided key. |
size | public int size()(Code) | | Get the current size of the cache.
|
store | public void store(K key, V value)(Code) | | Store an object in the cache.
Parameters: key - key associated with object to store. Parameters: value - object identified by provided key. |
store | public void store(K key, V value, long expireTime)(Code) | | Store an object in the cache.
Parameters: key - - the key to retrieve the object later. Parameters: value - - the object to be cached. Parameters: expireTime - - milliseconds that this item should be kept in the cache (accurate totuner-sleeptime seconds, as specified in whirlycache.xml . |
|
|