|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--edu.ucsb.adl.bucket99.QueryDriver
Driver for the ADL query service. The driver maintains a pool of
database connections, manages query threads, and logs requests to a
log file. Translation of queries to SQL is performed by a
separate, dynamically-loaded class. See class for a description of the records logged by this
driver.
QueryThread
This class reads the following properties from the Bucket99 driver
configuration file bucket99.conf. Property values may
be indirectly specified using the notation @P
where P is the name of another property (see ExtendedProperties for more information).
query.database_driver_class
com.informix.jdbc.IfxDriver".
query.database_url
query.database_properties
none". If the
filename is not absolute, it is interpreted relative to the
directory containing the Bucket99 configuration file.
query.database_name
informix@@myhost". Used for status reporting only.
If not desired, leave empty.
query.minimum_connections
1".
query.maximum_connections
3".
query.test_query
select 1 from dual".
query.connection_lifetime
3600000" is one hour.
query.connection_reaper_cycle_time
300000" is 5 minutes.
query.translator_class
edu.ucsb.adl.bucket99.PythonQueryTranslator".
query.validation
on" or "off". If
"on", the standard ADL metadata views in query results
are validated for correctness.
query.log_file
j2se-logger:L", the name
L of the Java Logger
to log invocation records to (at logging level INFO); or the string
"none" if logging is not desired. If the filename is
not absolute, it is interpreted relative to the directory
containing the Bucket99 configuration file.
s" (seconds), "m" (minutes),
"h" (hours), and "d" (days).
$Log: QueryDriver.java,v $
Revision 1.13 2006/06/23 02:58:57 gjanee
Incidental support for metadata caching. The driver now looks at
the collection-specific middleware configuration file to determine
what kind of metadata driver to create. This is an improvement
over the old behavior (the driver was hard-coded to always create
Bucket99 metadata drivers), but it's also a bit of a hack.
Revision 1.12 2004/09/23 17:16:35 gjanee
Rewrite to use class
edu.ucsb.adl.middleware.ExtendedProperties.
Revision 1.11 2004/03/17 19:39:32 gjanee
Minor change to accommodate a change to
ConnectionPool.Status.
Revision 1.10 2004/03/11 20:25:13 gjanee
Added support for different units of measure in time duration
properties.
Revision 1.9 2004/03/06 00:08:11 gjanee
Added support for multiple middleware instances. A middleware
instance is represented by a Global object that is
tied to a main middleware configuration file. All service objects
now maintain a reference to the appropriate Global
object. Instance-wide variables formerly coded as class variables
are now held by the Global object; various methods
that return instance-wide variables now accept a
Global object as an argument. The Global
object is now passed to all service drivers.
Revision 1.8 2003/06/13 04:03:54 gjanee
Added support for logging to Java loggers. Modified the
interpretation of the query.log_file property.
Revision 1.7 2003/06/12 16:51:12 gjanee
Added validation of query results. Added the
query.validation property.
Revision 1.6 2002/09/28 21:10:00 gjanee
Minor documentation change.
Revision 1.5 2002/09/28 20:59:18 gjanee
Configuration file renames. Renamed the Bucket99 configuration
file to bucket99.conf.
Revision 1.4 2002/09/26 15:09:49 gjanee
Added support for a separate Java properties file containing
database connection properties. Added property
query.database_properties. Added support for short,
descriptive database names. Added property
query.database_name and method
getDatabaseName.
Revision 1.3 2001/10/09 20:31:16 gjanee
Added support for relative filenames.
Revision 1.2 2001/08/20 19:46:26 gjanee
Switched to the new configuration file structure. In the new
structure, an entirely collection-independent "main" configuration
file refers to a directory of subdirectories, one subdirectory per
collection; each subdirectory holds a collection-specific
middleware configuration file in addition to any configuration
files required by the collection driver.
Revision 1.1 2000/10/12 16:44:58 gjanee
Initial revision
| Method Summary | |
static edu.ucsb.adl.bucket99.QueryDriver |
createDriver(edu.ucsb.adl.middleware.Global global,
java.io.File directory,
java.lang.String collection)
Creates a QueryDriver for a collection. |
edu.ucsb.adl.middleware.QueryThread |
createQueryThread(java.lang.String collection,
edu.ucsb.adl.middleware.Query query,
edu.ucsb.adl.middleware.ResultAccumulator accumulator)
Creates a thread that processes a query on behalf of the collection. |
void |
destroy()
Frees all resources held by the driver. |
edu.ucsb.adl.bucket99.QueryThread[] |
getActiveThreads()
Returns all currently active query threads. |
static edu.ucsb.adl.bucket99.QueryDriver[] |
getAllInstances(edu.ucsb.adl.middleware.Global global)
Returns all Bucket99 query drivers, i.e., all instances of this class. |
java.lang.String |
getCollection()
Returns the name of the collection on whose behalf the driver is running. |
java.lang.String |
getDatabaseName()
Returns a short, descriptive name for the database. |
ConnectionPool.Status |
getPoolStatus()
Returns the status of the driver's connection pool. |
void |
threadStarting(edu.ucsb.adl.bucket99.QueryThread thread)
For use by QueryThread only. |
void |
threadTerminated(edu.ucsb.adl.bucket99.QueryThread thread)
For use by QueryThread only. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
public static edu.ucsb.adl.bucket99.QueryDriver[] getAllInstances(edu.ucsb.adl.middleware.Global global)
global - The global object representing this instance of the middleware.
public static edu.ucsb.adl.bucket99.QueryDriver createDriver(edu.ucsb.adl.middleware.Global global,
java.io.File directory,
java.lang.String collection)
throws InternalErrorException
QueryDriver for a collection.
global - The global object representing this instance of the middleware.directory - The pathname of the directory containing the Bucket99 driver
configuration file.collection - The name of the collection, e.g., "adl_catalog".
QueryDriver.
InternalErrorException - If any error is encountered.public java.lang.String getCollection()
adl_catalog".public java.lang.String getDatabaseName()
informix@myhost") or
null.public ConnectionPool.Status getPoolStatus()
public edu.ucsb.adl.middleware.QueryThread createQueryThread(java.lang.String collection,
edu.ucsb.adl.middleware.Query query,
edu.ucsb.adl.middleware.ResultAccumulator accumulator)
throws MiddlewareException
createQueryThread in interface QueryDrivercollection - The collection name, e.g., "adl_catalog".query - The query.accumulator - The result accumulator to which query results are to be sent.
UnsupportedException - If the query is not supported.
InternalErrorException - If the thread cannot otherwise be created.
MiddlewareExceptionQueryServicepublic void threadStarting(edu.ucsb.adl.bucket99.QueryThread thread)
QueryThread only.
public void threadTerminated(edu.ucsb.adl.bucket99.QueryThread thread)
QueryThread only.
public edu.ucsb.adl.bucket99.QueryThread[] getActiveThreads()
public void destroy()
destroy in interface QueryDriver
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||