org.objectweb.cjdbc.controller.cache.result.rules
Class EagerCaching

java.lang.Object
  extended byorg.objectweb.cjdbc.controller.cache.result.CacheBehavior
      extended byorg.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

Field Summary
private  long timeout
           
 
Fields inherited from class org.objectweb.cjdbc.controller.cache.result.CacheBehavior
 
Constructor Summary
EagerCaching(long timeout)
          Define this CacheBehavior as EagerCaching
 
Method Summary
 AbstractResultCacheEntry getCacheEntry(SelectRequest sqlQuery, ControllerResultSet result, AbstractResultCache cache)
          Builds a cache entry from a SelectRequest and a ControllerResultSet.
 java.lang.String getXml()
          Implementation specific xml dump of the cache behavior.
 
Methods inherited from class org.objectweb.cjdbc.controller.cache.result.CacheBehavior
getType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

timeout

private long timeout
Constructor Detail

EagerCaching

public EagerCaching(long timeout)
Define this CacheBehavior as EagerCaching

Parameters:
timeout - Timeout for this cache entry
Method Detail

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 cache
result - value to add in the cache
cache - 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.