| com.whirlycott.cache.Cacheable
All known Subclasses: com.whirlycott.cache.test.DummyCacheable,
Cacheable | public interface Cacheable (Code) | | This is an optional interface for object keys which may be stored in the cache.
After each retrieve(), store() or remove() operation for a particular Cache, the
corresponding method of the object implementing this interface is called.
The onRemove(), onStore() and onRetrieve() methods are called both by cache policies
and regular client calls on the Cache interface (i.e. operations within policies
also call these methods).
Implementing this interface will not result in any performance increase.
On the contrary, additional work per Cache operation will only serve to slow
things down.
author: Philip Jacob phil@whirlycott.com |
Method Summary | |
public void | onRemove(Object _value) Hook for actions to be performed during a remove() operation.
Parameters: _value - The value being removed. | public void | onRetrieve(Object _value) Hook for actions to be performed during a retrieve() operation.
Parameters: _value - The value being retrieved. | public void | onStore(Object _value) Hook for actions to be performed during a store() operation.
Parameters: _value - The value being stored. |
onRemove | public void onRemove(Object _value)(Code) | | Hook for actions to be performed during a remove() operation.
Parameters: _value - The value being removed. Can possibly be a null value. |
onRetrieve | public void onRetrieve(Object _value)(Code) | | Hook for actions to be performed during a retrieve() operation.
Parameters: _value - The value being retrieved. Can possibly be a null value. |
onStore | public void onStore(Object _value)(Code) | | Hook for actions to be performed during a store() operation.
Parameters: _value - The value being stored. Can possibly be a null value. |
|
|