|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.cjdbc.controller.requestmanager.ParsingCache
This class implements a request parsing cache.
Nested Class Summary | |
private class |
ParsingCache.CurrentlyParsingEntry
CurrentlyParsingEntry contains a (Request,ParserThread) which is an element of the currentlyParsing Hashtable. |
Field Summary | |
private boolean |
backgroundParsing
|
private java.util.Hashtable |
cache
|
private boolean |
caseSensitiveParsing
|
private java.util.Hashtable |
currentlyParsing
|
private int |
granularity
|
private RequestManager |
requestManager
|
Constructor Summary | |
ParsingCache(int granularity,
RequestManager requestManager)
Constructor for ParsingCache. |
|
ParsingCache(int granularity,
RequestManager requestManager,
boolean backgroundParsing)
Constructor for ParsingCache. |
Method Summary | |
void |
getParsingFromCache(AbstractRequest request)
If the same SQL query is found in the cache, the parsing is cloned into the given request. |
void |
getParsingFromCacheAndParseIfMissing(AbstractRequest request)
Method getParsingFromCacheAndParseIfMissing. |
boolean |
isBackgroundParsing()
Returns the backgroundParsing. |
boolean |
isCaseSensitiveParsing()
Returns the caseSensitiveParsin. |
void |
setBackgroundParsing(boolean backgroundParsing)
Sets the backgroundParsing. |
void |
setCaseSensitiveParsing(boolean isCaseSensitiveParsing)
Sets the parsing case sensitivity |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private java.util.Hashtable cache
private java.util.Hashtable currentlyParsing
private RequestManager requestManager
private int granularity
private boolean backgroundParsing
private boolean caseSensitiveParsing
Constructor Detail |
public ParsingCache(int granularity, RequestManager requestManager)
granularity
- the parsing granularityrequestManager
- the request manager this cache belongs topublic ParsingCache(int granularity, RequestManager requestManager, boolean backgroundParsing)
granularity
- the parsing granularityrequestManager
- the request manager this cache belongs tobackgroundParsing
- true if the parsing should be done in background
by a ParserThreadMethod Detail |
public void getParsingFromCache(AbstractRequest request)
request
- the request you look forpublic void getParsingFromCacheAndParseIfMissing(AbstractRequest request) throws java.sql.SQLException
request
- the request we look for
java.sql.SQLException
- if an error occurspublic boolean isBackgroundParsing()
public void setBackgroundParsing(boolean backgroundParsing)
backgroundParsing
- The backgroundParsing to setpublic void setCaseSensitiveParsing(boolean isCaseSensitiveParsing)
isCaseSensitiveParsing
- true if parsing is case sensitivepublic boolean isCaseSensitiveParsing()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |