gr.uoa.di.madgik.searchlibrary.operatorlibrary.sort
Class OnlineSortWorker<T extends gr.uoa.di.madgik.grs.record.Record>

java.lang.Object
  extended by gr.uoa.di.madgik.searchlibrary.operatorlibrary.sort.OnlineSortWorker<T>
All Implemented Interfaces:
SortWorker, Runnable

public class OnlineSortWorker<T extends gr.uoa.di.madgik.grs.record.Record>
extends Object
implements SortWorker

Used to populate the created ResultSet with records after the locator to the result has been sent

Author:
UoA

Constructor Summary
OnlineSortWorker(gr.uoa.di.madgik.grs.reader.RandomReader<T> reader, gr.uoa.di.madgik.grs.writer.IRecordWriter<gr.uoa.di.madgik.grs.record.Record> writer, String keyFieldName, short order, ComparisonMethod method, ComparisonMode mode, long timeout, TimeUnit timeUnit, StatsContainer stats)
          Constructs an OnlineSortWorker
 
Method Summary
 void run()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OnlineSortWorker

public OnlineSortWorker(gr.uoa.di.madgik.grs.reader.RandomReader<T> reader,
                        gr.uoa.di.madgik.grs.writer.IRecordWriter<gr.uoa.di.madgik.grs.record.Record> writer,
                        String keyFieldName,
                        short order,
                        ComparisonMethod method,
                        ComparisonMode mode,
                        long timeout,
                        TimeUnit timeUnit,
                        StatsContainer stats)
                 throws Exception
Constructs an OnlineSortWorker

Parameters:
reader - The RandomReader from which input will be read
writer - The IRecordWriter to which output will be written
keyFieldName - The Field name of the key based on which the sorting should be performed
order - The order of the sorting. This should be one of CompareTokens.ASCENDING_ORDER and CompareTokens.DESCENDING_ORDER
method - The method of comparison. This should be one of ComparisonMethod.FULL_COMPARISON, ComparisonMethod.DETECT_MODE and ComparisonMethod.PROVIDED_MODE
mode - The mode of comparison. This should be one of ComparisonMode.COMPARE_STRINGS, ComparisonMode.COMPARE_LONGINTS, ComparisonMode.COMPARE_DOUBLES and ComparisonMode.COMPARE_DATES
timeout - The timeout to be used both by the reader and the writer
timeUnit - The unit of the timeout to be used
stats - statistics
Throws:
Exception
Method Detail

run

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


Copyright © 2013. All Rights Reserved.