public class TSafeParserPool extends TParserPool
TParserPool.ParserFunction<T>, TParserPool.PoolStatistics, TParserPool.TimeoutException| Constructor and Description |
|---|
TSafeParserPool()
Creates a safe parser pool with default size
|
TSafeParserPool(int poolSize)
Creates a safe parser pool with specified size
|
| Modifier and Type | Method and Description |
|---|---|
TStatementList |
safeParseSQL(EDbVendor vendor,
String sqlText)
Safe parsing method that returns statements without parser references.
|
TSourceTokenList |
safeTokenizeSQL(EDbVendor vendor,
String sqlText)
Safe tokenization method.
|
<T> T |
withParser(EDbVendor vendor,
TParserPool.ParserFunction<T> function)
Executes a function with a borrowed parser and automatically returns it.
|
borrowParser, getStatistics, prewarm, returnParser, shutdownpublic TSafeParserPool()
public TSafeParserPool(int poolSize)
poolSize - Size of the pool for each vendorpublic <T> T withParser(EDbVendor vendor, TParserPool.ParserFunction<T> function) throws Exception
withParser in class TParserPoolvendor - Database vendorfunction - Function to execute with the parserExceptionpublic TStatementList safeParseSQL(EDbVendor vendor, String sqlText) throws Exception
vendor - Database vendorsqlText - SQL text to parseExceptionpublic TSourceTokenList safeTokenizeSQL(EDbVendor vendor, String sqlText) throws Exception
vendor - Database vendorsqlText - SQL text to tokenizeException