gr.uoa.di.madgik.searchlibrary.operatorlibrary.gmerge
Class GradualMergeWorker

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

public class GradualMergeWorker
extends Thread

Operator class used to create a merged ResultSet output from the contents of multiple ResultSet, not all known at initialization time. The number of ResultSet to be merged may grow dynamically.

Author:
john.gerbesiotis - DI NKUA

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
GradualMergeWorker(Vector<ReaderHolder> readers, StatsContainer stats, long timeout, TimeUnit timeUnit, String uid, GradualLocatorReader inputRetriever, Object synchDispatcher, Object synchMergingStart)
          Creates a new GradualMergeWorker
 
Method Summary
 URI getWriterLocator()
           
 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

GradualMergeWorker

public GradualMergeWorker(Vector<ReaderHolder> readers,
                          StatsContainer stats,
                          long timeout,
                          TimeUnit timeUnit,
                          String uid,
                          GradualLocatorReader inputRetriever,
                          Object synchDispatcher,
                          Object synchMergingStart)
Creates a new GradualMergeWorker

Parameters:
readers - Vector holding info on the input ResultSet
stats - Statistics
timeout - The timeout that will be used by the RecordWriter and all ForwardReaders
timeUnit - The timeout unit that will be used by the RecordWriter and all ForwardReaders
uid - A unique identifier for this operation
inputRetriever - The retriever of the input locators
synchDispatcher - synchronization object
synchMergingStart -
Method Detail

run

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

getWriterLocator

public URI getWriterLocator()
Returns:
the writer


Copyright © 2013. All Rights Reserved.