Public Member Functions | |
ResultCacheRule (String queryString, boolean caseSensitive, boolean applyToSkeleton, long timestampResolution) throws RESyntaxException | |
RE | getQueryPattern () |
CacheBehavior | getCacheBehavior () |
void | setCacheBehavior (CacheBehavior behavior) |
long | getTimestampResolution () |
CacheBehavior | matches (AbstractRequest request) |
String | getXml () |
Package Attributes | |
Trace | logger = Trace.getLogger(ResultCacheRule.class.getName()) |
ResultCacheRule
is defined by a queryPattern, set to 'default' if default rule, and a CacheBehavior
.
Definition at line 42 of file ResultCacheRule.java.
|
Creates a new
Definition at line 61 of file ResultCacheRule.java. 00067 { 00068 this.queryString = queryString; 00069 queryPattern = new RE(queryString); 00070 this.isCaseSensitive = caseSensitive; 00071 this.applyToSkeleton = applyToSkeleton; 00072 this.timestampResolution = timestampResolution; 00073 }
|
|
Get the cache behavior
Definition at line 90 of file ResultCacheRule.java. 00091 {
00092 return behavior;
00093 }
|
|
Get the query pattern
Definition at line 80 of file ResultCacheRule.java. 00081 { 00082 return this.queryPattern; 00083 }
|
|
Retrieve the timestamp resolution of this scheduler
Definition at line 110 of file ResultCacheRule.java. 00111 { 00112 return this.timestampResolution; 00113 }
|
|
Definition at line 132 of file ResultCacheRule.java. References org.objectweb.cjdbc.controller.cache.result.CacheBehavior.getXml(). 00133 { 00134 StringBuffer info = new StringBuffer(); 00135 info.append( 00136 "<" 00137 + DatabasesXmlTags.ELT_ResultCacheRule 00138 + " " 00139 + DatabasesXmlTags.ATT_queryPattern 00140 + "=\"" 00141 + queryString 00142 + "\" " 00143 + DatabasesXmlTags.ATT_caseSensitive 00144 + "=\"" 00145 + isCaseSensitive 00146 + "\" " 00147 + DatabasesXmlTags.ATT_applyToSkeleton 00148 + "=\"" 00149 + applyToSkeleton 00150 + "\" " 00151 + DatabasesXmlTags.ATT_timestampResolution 00152 + "=\"" 00153 + timestampResolution / 1000 00154 + "\" >"); 00155 info.append(behavior.getXml()); 00156 info.append("</" + DatabasesXmlTags.ELT_ResultCacheRule + ">"); 00157 return info.toString(); 00158 }
|
|
Definition at line 119 of file ResultCacheRule.java. References org.objectweb.cjdbc.common.sql.AbstractRequest.getSQL(). 00120 { 00121 if (queryPattern.match(request.getSQL())) 00122 { 00123 return behavior; 00124 } 00125 else 00126 return null; 00127 }
|
|
Set the cache behavior
Definition at line 100 of file ResultCacheRule.java. 00101 {
00102 this.behavior = behavior;
00103 }
|