gr.uoa.di.madgik.searchlibrary.operatorlibrary.extjdbc
Class QueryJdbcWorker

java.lang.Object
  extended by java.lang.Thread
      extended by gr.uoa.di.madgik.searchlibrary.operatorlibrary.extjdbc.QueryJdbcWorker
All Implemented Interfaces:
Runnable

public class QueryJdbcWorker
extends Thread

Worker Thread that continues to update the produced ResultSet in the background

Author:
UoA

Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
 
Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
QueryJdbcWorker(ResultSet rs, String[] columnNames, String UniqueDocId, gr.uoa.di.madgik.grs.writer.IRecordWriter<gr.uoa.di.madgik.grs.record.Record> writer, long timeout, TimeUnit timeUnit, StatsContainer stats)
          Creates a new QueryJdbcWorker
 
Method Summary
 URI getLocator()
          retrieves the writer this thread is populating
 void run()
           
 
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
 

Constructor Detail

QueryJdbcWorker

public QueryJdbcWorker(ResultSet rs,
                       String[] columnNames,
                       String UniqueDocId,
                       gr.uoa.di.madgik.grs.writer.IRecordWriter<gr.uoa.di.madgik.grs.record.Record> writer,
                       long timeout,
                       TimeUnit timeUnit,
                       StatsContainer stats)
Creates a new QueryJdbcWorker

Parameters:
rs - the db ResultSet
columnNames - The names of the colums in the db table
UniqueDocId - A string that will make the ids of the produced records unique
writer - The writer to use
timeout - The timeout to be used both by the writer
timeUnit - The unit of the timeout to be used
stats - stats
Method Detail

getLocator

public URI getLocator()
retrieves the writer this thread is populating

Returns:
the writer

run

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


Copyright © 2013. All Rights Reserved.