| |
|
| java.lang.Object org.openharmonise.commons.cache.CachePointer
CachePointer | public class CachePointer (Code) | | Class to provide a soft link to an object in a cache, i.e. an link to
an object which may or may not actually reside in the cache but can
be accessed through the cache. Useful for pointing to objects which
logically don't change but their object representations do.
author: Michael Bell version: $Revision: 1.1 $ |
Constructor Summary | |
public | CachePointer() Constructs a cache pointer which does not reference any object. | public | CachePointer(Object key, AbstractCache cache) Constructs a cache pointer which references the object found in
cache cache with cache key key . |
m_cache_key | protected Object m_cache_key(Code) | | Cache key of object.
|
CachePointer | public CachePointer()(Code) | | Constructs a cache pointer which does not reference any object.
|
CachePointer | public CachePointer(Object key, AbstractCache cache)(Code) | | Constructs a cache pointer which references the object found in
cache cache with cache key key .
Parameters: key - the cache key Parameters: cache - the cache |
getCache | public AbstractCache getCache()(Code) | | Returns the cache the pointer is referencing.
the cache |
getKey | public Object getKey()(Code) | | Returns the cache key for the object the pointer is referencing.
the cache key |
setCache | public void setCache(AbstractCache cache)(Code) | | Set the cache the pointer will reference.
Parameters: cache - cache to be referenced |
setKey | public void setKey(Object object)(Code) | | Sets the cache key for the object the pointer will reference.
Parameters: object - the cache key corresponding to the cached object |
|
|
|