|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--java.lang.Thread
|
+--edu.ucsb.adl.bucket99.QueryThread
A thread that executes an SQL query on behalf of the query driver for a collection. The thread reserves a database connection from the driver's connection pool, executes the query, requests standard ADL metadata views for each returned holding identifier, and adds the results to the query's result accumulator. Duplicate holding identifiers are discarded. Upon completion, the thread logs a record containing the following fields:
query".
adl_catalog".
System.currentTimeMillis.
$Log: QueryThread.java,v $
Revision 1.7 2006/06/23 02:25:01 gjanee
Minor change to support metadata caching. Minor change to
accomodate Java 1.5.
Revision 1.6 2004/09/14 00:08:22 gjanee
Minor change to better handle formatting of SQL exceptions.
Revision 1.5 2003/06/12 17:09:07 gjanee
Query results are now Result objects, i.e., triplets
of standard metadata views. Added validation of query results.
Revision 1.4 2002/09/26 16:09:26 gjanee
Added the ability to preemptively cancel a running query.
Revision 1.3 2001/08/23 23:03:42 gjanee
Minor change to support string holding identifiers.
Revision 1.2 2000/10/26 13:12:06 gjanee
Disabled JDBC escape processing to avoid a syntax conflict with
the MapInfo SpatialWare DataBlade over the use of curly braces
("{}").
Revision 1.1 2000/10/11 17:42:54 gjanee
Initial revision
| Field Summary |
| Fields inherited from class java.lang.Thread |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Constructor Summary | |
QueryThread(java.lang.String collection,
edu.ucsb.adl.middleware.Query query,
java.lang.String sqlQuery,
edu.ucsb.adl.middleware.ResultAccumulator accumulator,
edu.ucsb.adl.bucket99.ConnectionPool pool,
edu.ucsb.adl.bucket99.QueryDriver queryDriver,
edu.ucsb.adl.middleware.MetadataDriver metadataDriver,
boolean validateResults,
edu.ucsb.adl.bucket99.Log log)
Creates a QueryThread. |
|
| Method Summary | |
java.lang.String |
getCollection()
Returns the name of the collection on whose behalf the thread is running. |
java.lang.String |
getProcessingState()
Returns the thread's state. |
edu.ucsb.adl.middleware.Query |
getQuery()
Returns the query the thread is executing. |
java.lang.String |
getSqlQuery()
Returns the SQL query the thread is executing. |
void |
run()
|
void |
stopASAP()
Requests that the thread stop as soon as possible. |
| Methods inherited from class java.lang.Thread |
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface edu.ucsb.adl.middleware.QueryThread |
start |
| Constructor Detail |
public QueryThread(java.lang.String collection,
edu.ucsb.adl.middleware.Query query,
java.lang.String sqlQuery,
edu.ucsb.adl.middleware.ResultAccumulator accumulator,
edu.ucsb.adl.bucket99.ConnectionPool pool,
edu.ucsb.adl.bucket99.QueryDriver queryDriver,
edu.ucsb.adl.middleware.MetadataDriver metadataDriver,
boolean validateResults,
edu.ucsb.adl.bucket99.Log log)
QueryThread.
collection - The name of the collection, e.g., "adl_catalog".query - The query to execute.sqlQuery - The query to execute in SQL form.accumulator - The accumulator to which results are to be sent.pool - The connection pool.queryDriver - The query driver creating the thread.metadataDriver - The metadata driver to use to obtain metadata views.validateResults - Indicates if query results should be validated.log - The log file to log to, or null if logging is not
desired.
java.lang.NullPointerException - If any argument other than log is
null.| Method Detail |
public void stopASAP()
stopASAP in interface QueryThreadpublic java.lang.String getProcessingState()
public java.lang.String getCollection()
getCollection in interface QueryThreadadl_catalog".public edu.ucsb.adl.middleware.Query getQuery()
public java.lang.String getSqlQuery()
public void run()
run in interface java.lang.Runnablerun in class java.lang.Thread
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||