prefuse.data.io.sql
Class DataSourceWorker

java.lang.Object
  extended by java.lang.Thread
      extended by prefuse.data.io.sql.DataSourceWorker
All Implemented Interfaces:
java.lang.Runnable

public class DataSourceWorker
extends java.lang.Thread

Worker thread that asynchronously handles a queue of jobs, with each job responsible for issuing a query and processing the results. Currently involves just a single thread, in the future this may be expanded to thread pool for greater concurrency.

Author:
jeffrey heer
See Also:
DatabaseDataSource

Nested Class Summary
static class DataSourceWorker.Entry
          Stores the parameters of a data query and processing job.
static interface DataSourceWorker.Listener
          Listener interface for receiving notifications about the status of a submitted data query and processing job.
 
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Method Summary
 void run()
           
static void submit(DataSourceWorker.Entry e)
          Submit a job to the worker thread.
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, 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
 

Method Detail

submit

public static void submit(DataSourceWorker.Entry e)
Submit a job to the worker thread.

Parameters:
e - an DataSourceWorker.Entry instance that contains the parameters of the job.

run

public void run()
Specified by:
run in interface java.lang.Runnable
Overrides:
run in class java.lang.Thread
See Also:
Runnable.run()


Copyright © 2007 Regents of the University of California