Class Database.ExecuteQueryThread

  • All Implemented Interfaces:
    java.lang.Runnable
    Enclosing class:
    Database

    protected class Database.ExecuteQueryThread
    extends java.lang.Thread
    Thread used to execute queries. An instance of this thread is spun up every time a query is executed. This is necessary because JDBC does not guarantee interruptability, and the Postgresql JDBC driver unfortunately eats all thread interrupts. So, we fire up a thread to do each interaction with the database server, thus insuring that the owning thread remains interruptable and will therefore not block shutdown.
    • Nested Class Summary

      • Nested classes/interfaces inherited from class java.lang.Thread

        java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
    • Constructor Summary

      Constructors 
      Constructor Description
      ExecuteQueryThread​(java.sql.Connection connection, java.lang.String query, java.util.List params, boolean bResults, int maxResults, ResultSpecification spec, ILimitChecker returnLimit)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      IResultSet finishUp()  
      void run()  
      • Methods inherited from class java.lang.Thread

        activeCount, checkAccess, clone, countStackFrames, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, suspend, toString, yield
      • Methods inherited from class java.lang.Object

        equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • connection

        protected java.sql.Connection connection
      • query

        protected java.lang.String query
      • params

        protected java.util.List params
      • bResults

        protected boolean bResults
      • maxResults

        protected int maxResults
      • exception

        protected java.lang.Throwable exception
    • Constructor Detail

      • ExecuteQueryThread

        public ExecuteQueryThread​(java.sql.Connection connection,
                                  java.lang.String query,
                                  java.util.List params,
                                  boolean bResults,
                                  int maxResults,
                                  ResultSpecification spec,
                                  ILimitChecker returnLimit)
    • Method Detail

      • run

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