org.objectweb.cjdbc.controller.cache.result
Class ResultCacheDatabase
java.lang.Object
org.objectweb.cjdbc.controller.cache.result.AbstractResultCache
org.objectweb.cjdbc.controller.cache.result.ResultCache
org.objectweb.cjdbc.controller.cache.result.ResultCacheDatabase
- All Implemented Interfaces:
- XmlComponent
- public class ResultCacheDatabase
- extends ResultCache
This is a query cache implementation with a database granularity:
DATABASE
: the cache is flushed each time the database is
updated (every INSERT, UPDATE, DELETE, ... statement).
- Version:
- 1.0
- Author:
- Emmanuel Cecchet , Nicolas Modrzyk
Fields inherited from class org.objectweb.cjdbc.controller.cache.result.ResultCache |
cdbs |
Constructor Summary |
ResultCacheDatabase(int maxEntries,
int pendingTimeout)
Builds a new ResultCache with a database granularity. |
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ResultCacheDatabase
public ResultCacheDatabase(int maxEntries,
int pendingTimeout)
- Builds a new ResultCache with a database granularity.
- Parameters:
maxEntries
- maximum number of entriespendingTimeout
- pending timeout for concurrent queries
processAddToCache
protected 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(org.objectweb.cjdbc.controller.cache.result.entries.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.