org.drupal.project.computing
Class DDatabase.AsyncBatchRunner

java.lang.Object
  extended by java.lang.Thread
      extended by org.drupal.project.computing.DDatabase.AsyncBatchRunner
All Implemented Interfaces:
java.lang.Runnable
Enclosing class:
DDatabase

public static class DDatabase.AsyncBatchRunner
extends java.lang.Thread

This is thread that upload data through JDBC concurrently. attention: could submit this back to commons.dbutils for reuse.


Nested Class Summary
 
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
 
Constructor Summary
DDatabase.AsyncBatchRunner(java.sql.Connection connection, java.lang.String sql)
          Equivalent to AsyncBatchRunner(null, threadName, connection, sql, 0)
DDatabase.AsyncBatchRunner(java.sql.Connection connection, java.lang.String sql, int batchSize)
          Initialize the AsyncBatchRunner.
 
Method Summary
 void accomplish()
           
 void put(java.lang.Object... row)
           
 void run()
           
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, clone, 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
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DDatabase.AsyncBatchRunner

public DDatabase.AsyncBatchRunner(java.sql.Connection connection,
                                  java.lang.String sql)
                           throws DConnectionException
Equivalent to AsyncBatchRunner(null, threadName, connection, sql, 0)

Parameters:
connection -
sql -
Throws:
DConnectionException

DDatabase.AsyncBatchRunner

public DDatabase.AsyncBatchRunner(java.sql.Connection connection,
                                  java.lang.String sql,
                                  int batchSize)
                           throws DConnectionException
Initialize the AsyncBatchRunner.

Parameters:
connection - The connection to the Drupal database.
sql - The full SQL for this AsyncBatchRunner. Use d() to parse any tables enclosed with {}.
batchSize -
Throws:
DConnectionException
Method Detail

put

public void put(java.lang.Object... row)

accomplish

public void accomplish()

run

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