org.objectweb.cjdbc.controller.cache.result
Class CacheBehavior

java.lang.Object
  extended byorg.objectweb.cjdbc.controller.cache.result.CacheBehavior
Direct Known Subclasses:
EagerCaching, NoCaching, RelaxedCaching

public abstract class CacheBehavior
extends java.lang.Object

Abstract class for the different cache actions. We need this class for adding versatility in the parameters of each Caching action.

Version:
1.0
Author:
Nicolas Modrzyk , Emmanuel Cecchet

Field Summary
(package private)  Trace logger
           
 
Constructor Summary
protected CacheBehavior()
           
 
Method Summary
abstract  AbstractResultCacheEntry getCacheEntry(SelectRequest sqlQuery, ControllerResultSet result, AbstractResultCache cache)
          Builds a cache entry from a SelectRequest and a ControllerResultSet.
 java.lang.String getType()
          The name of the class instance
abstract  java.lang.String getXml()
          Implementation specific xml dump of the cache behavior.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

Trace logger
Constructor Detail

CacheBehavior

protected CacheBehavior()
Method Detail

getType

public java.lang.String getType()
The name of the class instance

Returns:
class name of the current type

getCacheEntry

public abstract AbstractResultCacheEntry getCacheEntry(SelectRequest sqlQuery,
                                                       ControllerResultSet result,
                                                       AbstractResultCache cache)
Builds a cache entry from a SelectRequest and a ControllerResultSet. This cache entry can then be inserted in the cache.

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

getXml

public abstract java.lang.String getXml()
Implementation specific xml dump of the cache behavior.

Returns:
xml dump of the cache behavior
See Also:
XmlComponent.getXml()


Copyright © 2002, 2005 - ObjectWeb Consortium - All Rights Reserved.