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

java.lang.Object
  extended byorg.objectweb.cjdbc.controller.cache.result.AbstractResultCache
      extended byorg.objectweb.cjdbc.controller.cache.result.ResultCache
          extended byorg.objectweb.cjdbc.controller.cache.result.ResultCacheColumnUnique
All Implemented Interfaces:
XmlComponent

public class ResultCacheColumnUnique
extends ResultCache

This is a query cache implementation with a column unique granularity:

Version:
1.0
Author:
Emmanuel Cecchet , Nicolas Modrzyk

Field Summary
 
Fields inherited from class org.objectweb.cjdbc.controller.cache.result.ResultCache
cdbs
 
Fields inherited from class org.objectweb.cjdbc.controller.cache.result.AbstractResultCache
logger, parsingGranularity
 
Fields inherited from interface org.objectweb.cjdbc.common.xml.XmlComponent
DOCTYPE_CONTROLLER, DOCTYPE_DB, XML_VERSION
 
Constructor Summary
ResultCacheColumnUnique(int maxEntries, int pendingTimeout)
          Builds a new ResultCache with a column unique granularity.
 
Method Summary
 java.lang.String getName()
          Retrieve the name of this cache
 boolean isUpdateNecessary(UpdateRequest request)
          Returns true if the cache does not contain the values that are given in the update statement.
 void processAddToCache(AbstractResultCacheEntry qe)
          Process the add to cache to update implementation specific data structures.
protected  void processWriteNotify(AbstractWriteRequest request)
          Implementation specific invalidation of the cache.
 
Methods inherited from class org.objectweb.cjdbc.controller.cache.result.ResultCache
addCachingRule, addToCache, commit, flushCache, getCacheData, getCacheSize, getCacheStatistics, getCacheStatsData, getDefaultRule, getEagerCache, getFromCache, getParsingGranularity, getPendingQueryTimeout, getQueries, getRelaxedCache, getXmlImpl, mergeDatabaseSchema, needInvalidate, removeFromCache, removeFromPendingQueries, rollback, setDatabaseSchema, setDefaultRule, setPendingQueryTimeout, shutdown, writeNotify
 
Methods inherited from class org.objectweb.cjdbc.controller.cache.result.AbstractResultCache
getXml, setParsingGranularity
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResultCacheColumnUnique

public ResultCacheColumnUnique(int maxEntries,
                               int pendingTimeout)
Builds a new ResultCache with a column unique granularity.

Parameters:
maxEntries - maximum number of entries
pendingTimeout - pending timeout for concurrent queries
Method Detail

processAddToCache

public void processAddToCache(AbstractResultCacheEntry qe)
Description copied from class: ResultCache
Process the add to cache to update implementation specific data structures.

Specified by:
processAddToCache in class ResultCache
Parameters:
qe - to add to the cache.
See Also:
ResultCache.processAddToCache(AbstractResultCacheEntry)

isUpdateNecessary

public boolean isUpdateNecessary(UpdateRequest request)
Description copied from class: AbstractResultCache
Returns true if the cache does not contain the values that are given in the update statement.

Specified by:
isUpdateNecessary in class ResultCache
See Also:
AbstractResultCache.isUpdateNecessary(org.objectweb.cjdbc.common.sql.UpdateRequest)

processWriteNotify

protected void processWriteNotify(AbstractWriteRequest request)
Description copied from class: ResultCache
Implementation specific invalidation of the cache.

Specified by:
processWriteNotify in class ResultCache
Parameters:
request - Write request that invalidates the cache.
See Also:
ResultCache.processWriteNotify(org.objectweb.cjdbc.common.sql.AbstractWriteRequest)

getName

public java.lang.String getName()
Description copied from class: ResultCache
Retrieve the name of this cache

Specified by:
getName in class ResultCache
Returns:
name
See Also:
ResultCache.getName()


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