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

java.lang.Object
  extended by gr.uoa.di.madgik.searchlibrary.operatorlibrary.Unary
      extended by gr.uoa.di.madgik.searchlibrary.operatorlibrary.gmerge.GradualMergeOp

public class GradualMergeOp
extends Unary

Operator class used to create a merged ResultSet output from the contents of multiple ResultSet.

Author:
john.gerbesiotis - DI NKUA

Field Summary
static int BufferCapacityDef
          The default capacity of the RecordWriters and, if applicable, of all IRecordReaders' buffers
static OperationMode OperationModeDef
          The default operation mode.
 
Fields inherited from class gr.uoa.di.madgik.searchlibrary.operatorlibrary.Unary
inLocator, operatorParameters, stats, timeout, TimeoutDef, timeUnit, TimeUnitDef
 
Constructor Summary
GradualMergeOp(URI inLocator, Map<String,String> operatorParameters, long timeout, TimeUnit timeUnit, StatsContainer stats)
          Creates a new GradualMergeOp with configurable operation mode and timeout
GradualMergeOp(URI inLocator, Map<String,String> operatorParameters, StatsContainer stats)
          Creates a new GradualMergeOp with the default timeout used both for readers and the writer
 
Method Summary
 URI compute()
          Performs the merging operation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OperationModeDef

public static final OperationMode OperationModeDef
The default operation mode. Currently set to OperationMode.FirstAvailable


BufferCapacityDef

public static final int BufferCapacityDef
The default capacity of the RecordWriters and, if applicable, of all IRecordReaders' buffers

See Also:
Constant Field Values
Constructor Detail

GradualMergeOp

public GradualMergeOp(URI inLocator,
                      Map<String,String> operatorParameters,
                      StatsContainer stats)
               throws Exception
Creates a new GradualMergeOp with the default timeout used both for readers and the writer

Parameters:
inLocator - The locator of the inputs that will be merged
operatorParameters - oeprator parameters
stats - Statistics
Throws:
Exception

GradualMergeOp

public GradualMergeOp(URI inLocator,
                      Map<String,String> operatorParameters,
                      long timeout,
                      TimeUnit timeUnit,
                      StatsContainer stats)
               throws Exception
Creates a new GradualMergeOp with configurable operation mode and timeout

Parameters:
inLocator - The locator of the inputs that will be merged
operatorParameters - operator parameters
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
stats - Statistics
Throws:
Exception
Method Detail

compute

public URI compute()
            throws Exception
Performs the merging operation

Specified by:
compute in class Unary
Returns:
The locator of the merged result set
Throws:
Exception - An unrecoverable for the operation error occurred


Copyright © 2013. All Rights Reserved.