|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.objectweb.cjdbc.controller.cache.parsing.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 static Trace |
logger
|
private int |
maxNbOfEntries
|
private RequestManager |
requestManager
|
Constructor Summary | |
ParsingCache(int size,
boolean backgroundParsing)
Constructor for ParsingCache. |
Method Summary | |
int |
getGranularity()
Returns the granularity value. |
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. |
RequestManager |
getRequestManager()
Returns the requestManager value. |
java.lang.String |
getXml()
Get xml information about this ParsingCache |
boolean |
isBackgroundParsing()
Returns the backgroundParsing. |
boolean |
isCaseSensitiveParsing()
Returns the caseSensitiveParsin. |
void |
setBackgroundParsing(boolean backgroundParsing)
Sets the background parsing. |
void |
setCaseSensitiveParsing(boolean isCaseSensitiveParsing)
Sets the parsing case sensitivity |
void |
setGranularity(int granularity)
Sets the granularity value. |
void |
setRequestManager(RequestManager requestManager)
Sets the requestManager value. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static Trace logger
private java.util.Hashtable cache
private java.util.Hashtable currentlyParsing
private RequestManager requestManager
private int granularity
private int maxNbOfEntries
private boolean backgroundParsing
private boolean caseSensitiveParsing
Constructor Detail |
public ParsingCache(int size, boolean backgroundParsing)
size
- maximum cache size in nb of entriesbackgroundParsing
- true if the parsing should be done in background
by a ParserThreadMethod Detail |
public int getGranularity()
public void setGranularity(int granularity)
granularity
- The granularity to set.public RequestManager getRequestManager()
public void setRequestManager(RequestManager requestManager)
requestManager
- The requestManager to set.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()
public java.lang.String getXml()
String
in xml formatted text
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |