| java.lang.Object com.jofti.cache.BaseAdaptor
All known Subclasses: com.jofti.cache.adapter.ObjectGridListenerAdapter, com.jofti.cache.adapter.OSCacheAdapter, com.jofti.cache.adapter.EhCacheListenerAdapter, com.jofti.cache.adapter.OSCacheListenerAdapter, com.jofti.cache.adapter.CoherenceListenerAdapter, com.jofti.cache.adapter.MapAdapter, com.jofti.cache.adapter.JBossCacheAdapter, com.jofti.cache.adapter.EhCachePre1_2Adapter, com.jofti.cache.adapter.MockAdapter, com.jofti.cache.adapter.EhCacheAdapter,
BaseAdaptor | abstract public class BaseAdaptor implements IBaseAdaptor(Code) | | The base class for the adapters. The locking is used to allow a reasonable amount of concurrency in the
cache. There are 31 locks that are obtained as a mod 31 of the Object's hashcode. The premise is that a lock can be obtained on methods that modify or access the cache. The objective is to prevent
concurrent modification for identical keys . However, it is also desirable to allow concurrent usage of the
cache and the index as both should be multi-threaded. Although that is reliant on the implementation.
author: Steve Woodcock
|
checkMutable | protected boolean checkMutable(Code) | | |
checkMutable | protected Object checkMutable(Object key, Object result)(Code) | | Checks the multability of a Cache value retrieved from the Cache instance in the adapter. Each
adapter is responsible for providing the implementation.
Parameters: key - Parameters: result - The value from the Cache or Null if the value has changed after it was indexed |
getCacheValue | abstract protected Object getCacheValue(Object key)(Code) | | Returns the value from the Cache for the key. Each adpter is responsible for the specific implementation of this, as
the Cache retrieval mechanism will probably be different for each Cache.
Parameters: key - |
limitResults | public Map limitResults(Map temp, int startResult, int maxResults)(Code) | | |
releaseQueryLock | public void releaseQueryLock()(Code) | | |
releaseUpdateLock | public void releaseUpdateLock()(Code) | | |
|
|