Public Member Functions | |
ResultCacheTable (int maxEntries, int pendingTimeout) | |
boolean | isUpdateNecessary (UpdateRequest request) |
String | getName () |
Protected Member Functions | |
void | processAddToCache (CacheEntry qe) |
void | processWriteNotify (AbstractWriteRequest request) |
TABLE
: table granularity, entries in the cache are invalidated based on table dependencies.
Definition at line 47 of file ResultCacheTable.java.
|
Builds a new ResultCache with a table granularity.
Definition at line 55 of file ResultCacheTable.java. 00056 { 00057 super(maxEntries, pendingTimeout); 00058 parsingGranularity = ParsingGranularities.TABLE; 00059 }
|
|
Implements org.objectweb.cjdbc.controller.cache.result.ResultCache. Definition at line 99 of file ResultCacheTable.java. 00100 { 00101 return "table"; 00102 }
|
|
Implements org.objectweb.cjdbc.controller.cache.result.ResultCache. Definition at line 74 of file ResultCacheTable.java. 00075 { 00076 return true; 00077 }
|
|
Implements org.objectweb.cjdbc.controller.cache.result.ResultCache. Definition at line 64 of file ResultCacheTable.java. References org.objectweb.cjdbc.controller.cache.result.schema.CacheDatabaseTable.addCacheEntry(), org.objectweb.cjdbc.common.sql.SelectRequest.getFrom(), org.objectweb.cjdbc.controller.cache.result.entries.CacheEntry.getRequest(), and org.objectweb.cjdbc.controller.cache.result.schema.CacheDatabaseSchema.getTable(). 00065 {
00066 SelectRequest request = qe.getRequest();
00067 for (Iterator i = request.getFrom().iterator(); i.hasNext();)
00068 cdbs.getTable((String) i.next()).addCacheEntry(qe);
00069 }
|
|
Implements org.objectweb.cjdbc.controller.cache.result.ResultCache. Definition at line 82 of file ResultCacheTable.java. References org.objectweb.cjdbc.controller.cache.result.ResultCache.flushCache(), org.objectweb.cjdbc.controller.cache.result.schema.CacheDatabaseSchema.getTable(), org.objectweb.cjdbc.common.sql.AbstractWriteRequest.getTableName(), org.objectweb.cjdbc.controller.cache.result.schema.CacheDatabaseTable.invalidateAll(), and org.objectweb.cjdbc.common.log.Trace.warn(). 00083 { 00084 CacheDatabaseTable cdt = cdbs.getTable(request.getTableName()); 00085 00086 if (cdt != null) 00087 cdt.invalidateAll(); 00088 else 00089 { 00090 logger.warn("Table " + request.getTableName() 00091 + " not found in cache schema. Flushing whole cache."); 00092 flushCache(); 00093 } 00094 }
|