gr.uoa.di.madgik.searchlibrary.operatorlibrary.keeptop
Class KeepTopOp

java.lang.Object
  extended by gr.uoa.di.madgik.searchlibrary.operatorlibrary.keeptop.KeepTopOp

public class KeepTopOp
extends Object

Operator class used to perform a keep top operation on an input ResultSet and produce a new output ResultSet with the top records

Author:
UoA

Constructor Summary
KeepTopOp(URI locator, StatsContainer stats)
          Creates a new KeepTopOp with the default timeout for the reader and the writer
KeepTopOp(URI locator, StatsContainer stats, long timeout, TimeUnit timeUnit)
          Creates a new KeepTopOp with configurable timeout for the reader and the writer
 
Method Summary
 URI compute(int count)
          Performs the Keep Top operation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KeepTopOp

public KeepTopOp(URI locator,
                 StatsContainer stats)
Creates a new KeepTopOp with the default timeout for the reader and the writer

Parameters:
locator - The locator of the input
stats - Statistics

KeepTopOp

public KeepTopOp(URI locator,
                 StatsContainer stats,
                 long timeout,
                 TimeUnit timeUnit)
Creates a new KeepTopOp with configurable timeout for the reader and the writer

Parameters:
locator - The locator of the input
stats - Statistics
timeout - The timeout to be used both by the reader and the writer
timeUnit - The time unit of the timeout used
Method Detail

compute

public URI compute(int count)
            throws Exception
Performs the Keep Top operation

Parameters:
count - The number of records to keep
Returns:
The locator of the produced output
Throws:
Exception - An unrecoverable for the operation error occured


Copyright © 2013. All Rights Reserved.