public ParsingCache(int size, boolean backgroundParsing)(Code)
Constructor for ParsingCache.
Parameters: size - maximum cache size in nb of entries Parameters: backgroundParsing - true if the parsing should be done in backgroundby a ParserThread
Retrieves the current request parsing cache configuration. The returned
string contains:
granularity
maximum number of entries
background parsing flag
case sensitivity
a String containing the configuration of the cache
dumpCacheEntries
publicString dumpCacheEntries(int beginIndex, int max)(Code)
Prints entries of the cache, from beginIndex to (beginIndex + max) or to
the last entry if beginIndex+max is out of bounds
Parameters: beginIndex - entry from which to start dump Parameters: max - maximum number of entries to dump a string containing the cache entries (request unique key + shortdescription string) from beginIndex to the last entry or tobeginIndex+max.
If the same SQL query is found in the cache, the parsing is cloned into the
given request. If backgroundParsing is set to true, then a ParserThread
starts parsing the request in background else nothing is done on a cache
miss.
Parameters: request - the request you look for
public void setBackgroundParsing(boolean backgroundParsing)(Code)
Sets the background parsing. If true the request are parsed in background
by a separate thread that is created for this purpose.
Parameters: backgroundParsing - The backgroundParsing to set
setCaseSensitiveParsing
public void setCaseSensitiveParsing(boolean isCaseSensitiveParsing)(Code)
Sets the parsing case sensitivity
Parameters: isCaseSensitiveParsing - true if parsing is case sensitive