org.objectweb.cjdbc.controller.cache.result.rules
Class EagerCaching
java.lang.Object
org.objectweb.cjdbc.controller.cache.result.CacheBehavior
org.objectweb.cjdbc.controller.cache.result.rules.EagerCaching
- public class EagerCaching
- extends CacheBehavior
EagerCaching means that all entries in the cache are always coherent and any
update query (insert,delete,update,...) will automatically invalidate the
corresponding entry in the cache. This was the previous cache behavior for
all queries
- Version:
- 1.0
- Author:
- Nicolas Modrzyk
Fields inherited from class org.objectweb.cjdbc.controller.cache.result.CacheBehavior |
|
Constructor Summary |
EagerCaching(long timeout)
Define this CacheBehavior as EagerCaching |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
timeout
private long timeout
EagerCaching
public EagerCaching(long timeout)
- Define this CacheBehavior as EagerCaching
- Parameters:
timeout
- Timeout for this cache entry
getCacheEntry
public AbstractResultCacheEntry getCacheEntry(SelectRequest sqlQuery,
ControllerResultSet result,
AbstractResultCache cache)
- Description copied from class:
CacheBehavior
- Builds a cache entry from a
SelectRequest
and a
ControllerResultSet
. This cache entry can then be inserted
in the cache.
- Specified by:
getCacheEntry
in class CacheBehavior
- Parameters:
sqlQuery
- entry to add in the cacheresult
- value to add in the cachecache
- reference for EagerCaching in case the entry needs to remove
itself from the cache.
- Returns:
- the query cache entry to add to the cache
- See Also:
CacheBehavior.getCacheEntry(SelectRequest,
ControllerResultSet, AbstractResultCache)
getXml
public java.lang.String getXml()
- Description copied from class:
CacheBehavior
- Implementation specific xml dump of the cache behavior.
- Specified by:
getXml
in class CacheBehavior
- Returns:
- xml dump of the cache behavior
- See Also:
XmlComponent.getXml()
Copyright © 2002, 2005 - ObjectWeb Consortium - All Rights Reserved.