Public Member Functions | |
int | getParsingGranularity () |
void | setParsingGranularity (int parsingGranularity) |
void | setDatabaseSchema (DatabaseSchema dbs) |
void | mergeDatabaseSchema (DatabaseSchema dbs) |
abstract void | addCachingRule (ResultCacheRule rule) |
abstract ResultCacheRule | getDefaultRule () |
abstract void | setDefaultRule (ResultCacheRule defaultRule) |
abstract void | addToCache (SelectRequest request, ControllerResultSet result) throws CacheException |
abstract CacheEntry | getFromCache (SelectRequest request, boolean addToPendingQueries) |
abstract void | removeFromCache (SelectRequest request) |
abstract void | removeFromPendingQueries (SelectRequest request) |
abstract void | writeNotify (AbstractWriteRequest request) throws CacheException |
abstract boolean | isUpdateNecessary (UpdateRequest request) throws CacheException |
abstract void | flushCache () |
abstract void | commit (long transactionId) throws CacheException |
abstract void | rollback (long transactionId) throws CacheException |
String | getXml () |
abstract String[][] | getCacheData () throws CacheException |
abstract String[][] | getCacheStatsData () throws CacheException |
abstract CacheStatistics | getCacheStatistics () |
abstract long | getCacheSize () |
Protected Member Functions | |
abstract String | getXmlImpl () |
Protected Attributes | |
int | parsingGranularity = ParsingGranularities.NO_PARSING |
Static Protected Attributes | |
Trace | logger |
Only read requests (SELECT
s) can be cached, there is no sense to cache writes as they do not provide any result to cache. However, the cache must be notified of the write queries in order to maintain cache coherency.
Definition at line 53 of file AbstractResultCache.java.
|
Add precise management and configuration of the cache behavior. A cache rule contains information on a query pattern and how to act if that pattern was matched.
Implemented in org.objectweb.cjdbc.controller.cache.result.ResultCache. |
|
Adds an entry request/reply to the cache. Note that if the request was already in the cache, its result must be updated in any case but the request must never appear twice in the cache.
Implemented in org.objectweb.cjdbc.controller.cache.result.ResultCache. |
|
Commit a transaction given its id.
Implemented in org.objectweb.cjdbc.controller.cache.result.ResultCache. |
|
Removes all entries from the cache. Implemented in org.objectweb.cjdbc.controller.cache.result.ResultCache. |
|
Returns the content of the cache as displayable array of array of string
Implemented in org.objectweb.cjdbc.controller.cache.result.ResultCache. Referenced by org.objectweb.cjdbc.controller.monitoring.datacollector.DataCollector.retrieveCacheData(). |
|
Returns number of entries in the cache
Implemented in org.objectweb.cjdbc.controller.cache.result.ResultCache. |
|
Returns pointer to the stats collector
Implemented in org.objectweb.cjdbc.controller.cache.result.ResultCache. |
|
Returns a bunch of stats collected by the cache, such as cache hits.
Implemented in org.objectweb.cjdbc.controller.cache.result.ResultCache. Referenced by org.objectweb.cjdbc.controller.monitoring.datacollector.DataCollector.retrieveCacheStatsData(). |
|
Return the default cache rule
Implemented in org.objectweb.cjdbc.controller.cache.result.ResultCache. |
|
Gets the result to the given request from the cache.
The returned
An invalid
Implemented in org.objectweb.cjdbc.controller.cache.result.ResultCache. |
|
Gets the needed query parsing granularity.
Reimplemented in org.objectweb.cjdbc.controller.cache.result.ResultCache. Definition at line 84 of file AbstractResultCache.java. 00085 {
00086 return parsingGranularity;
00087 }
|
|
Definition at line 259 of file AbstractResultCache.java. References org.objectweb.cjdbc.controller.cache.result.AbstractResultCache.getXmlImpl(). 00261 { 00262 return getXmlImpl(); 00263 }
|
|
Gets information about the request cache in xml
Implemented in org.objectweb.cjdbc.controller.cache.result.ResultCache. Referenced by org.objectweb.cjdbc.controller.cache.result.AbstractResultCache.getXml(). |
|
Returns true if the cache does not contain the values that are given in the update statement.
Implemented in org.objectweb.cjdbc.controller.cache.result.ResultCache, org.objectweb.cjdbc.controller.cache.result.ResultCacheColumn, org.objectweb.cjdbc.controller.cache.result.ResultCacheColumnUnique, org.objectweb.cjdbc.controller.cache.result.ResultCacheDatabase, and org.objectweb.cjdbc.controller.cache.result.ResultCacheTable. |
|
Merge the given
Reimplemented in org.objectweb.cjdbc.controller.cache.result.ResultCache. Definition at line 118 of file AbstractResultCache.java. References org.objectweb.cjdbc.controller.cache.result.AbstractResultCache.logger. 00119 { 00120 if (logger.isInfoEnabled()) 00121 logger.info(Translate.get("cache.scheduler.doesnt.support.schemas")); 00122 }
|
|
Removes an entry from the cache (both request and reply are dropped). The request is NOT removed from the pending query list, but it shouldn't be in this list.
Implemented in org.objectweb.cjdbc.controller.cache.result.ResultCache. Referenced by org.objectweb.cjdbc.controller.cache.result.entries.ResultCacheEntryEager.invalidate(). |
|
Removes an entry from the pending query list.
Implemented in org.objectweb.cjdbc.controller.cache.result.ResultCache. |
|
Rollback a transaction given its id.
Implemented in org.objectweb.cjdbc.controller.cache.result.ResultCache. |
|
Sets the
Reimplemented in org.objectweb.cjdbc.controller.cache.result.ResultCache. Definition at line 106 of file AbstractResultCache.java. References org.objectweb.cjdbc.controller.cache.result.AbstractResultCache.logger. 00107 { 00108 if (logger.isInfoEnabled()) 00109 logger.info(Translate.get("cache.schemas.not.supported")); 00110 }
|
|
Set the default query rule
Implemented in org.objectweb.cjdbc.controller.cache.result.ResultCache. |
|
Sets the needed query parsing granularity.
Definition at line 95 of file AbstractResultCache.java. 00096 {
00097 this.parsingGranularity = parsingGranularity;
00098 }
|
|
Notifies the cache that the given write request has been issued, so that cache coherency can be maintained. If the cache is distributed, this method is reponsible for broadcasting this information to other caches.
Implemented in org.objectweb.cjdbc.controller.cache.result.ResultCache. |
|
Initial value: Trace
.getLogger("org.objectweb.cjdbc.controller.cache")
Definition at line 71 of file AbstractResultCache.java. Referenced by org.objectweb.cjdbc.controller.cache.result.AbstractResultCache.mergeDatabaseSchema(), and org.objectweb.cjdbc.controller.cache.result.AbstractResultCache.setDatabaseSchema(). |
|
Parsing granularity. Default is: org.objectweb.cjdbc.common.sql.ParsingGranularities#NO_PARSING. Definition at line 68 of file AbstractResultCache.java. |