gr.uoa.di.madgik.searchlibrary.operatorlibrary.merge
Class ReaderScan

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

public class ReaderScan
extends Thread

Helper thread class used to iterate over a ResultSet to retrieve the local payload parts and notify the merging thread when they are available

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
ReaderScan(Vector<ReaderHolder> readers, int index, BlockingQueue<RecordBufferEntry> buf, Queue<EventEntry> events, long timeout, TimeUnit timeUnit, String uid, OperationMode operationMode)
          Creates a new ReaderScan working on some input ForwardReader
 
Method Summary
 Pair<RecordBufferEntry,Integer> peek()
           
 Pair<RecordBufferEntry,Integer> poll()
           
 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

ReaderScan

public ReaderScan(Vector<ReaderHolder> readers,
                  int index,
                  BlockingQueue<RecordBufferEntry> buf,
                  Queue<EventEntry> events,
                  long timeout,
                  TimeUnit timeUnit,
                  String uid,
                  OperationMode operationMode)
Creates a new ReaderScan working on some input ForwardReader

Parameters:
readers - The ReaderHolder vector with the available input sources
index - The index of the ReaderHolder this thread should operate on
buf - The buffer to place the records read along with the id of the reader, which is equal to index
events - A queue to place the events read along with the id of the reader, which is equal to index
timeout - The timeout to use
timeUnit - The timeout unit to use
uid - A unique identifier for this operation
operationMode - The operation mode to use
Method Detail

run

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

poll

public Pair<RecordBufferEntry,Integer> poll()

peek

public Pair<RecordBufferEntry,Integer> peek()


Copyright © 2013. All Rights Reserved.