public class SortOp extends Object
org.gcube.searchservice.searchlibrary.resultset.ResultSet
and produces a output org.gcube.searchservice.searchlibrary.resultset.ResultSet sorted in the specified order.| Constructor and Description |
|---|
SortOp(URI inLocator,
StatsContainer stats)
Creates a new
SortOp operating on the identified input with default timeout |
SortOp(URI inLocator,
StatsContainer stats,
long timeout,
TimeUnit timeUnit) |
| Modifier and Type | Method and Description |
|---|---|
URI |
compute(String key,
short order)
Performs the sorting operation using default method
|
URI |
compute(String keyFieldName,
short order,
ComparisonMethod comparisonMethod,
ComparisonMode comparisonMode,
SortAlgorithm algorithm)
Performs the sorting operation
|
static void |
main(String[] args) |
public SortOp(URI inLocator, StatsContainer stats)
SortOp operating on the identified input with default timeoutinLocator - The locator identifying the inputstats - statisticspublic SortOp(URI inLocator, StatsContainer stats, long timeout, TimeUnit timeUnit)
inLocator - The locator identifying the input with configurable timeoutstats - statisticstimeout - The timeout to be used both by the reader and the writertimeUnit - The unit of the timeout to be usedpublic URI compute(String key, short order) throws Exception
key - The key to base the sorting onorder - The order of the sorting. This can be one of CompareTokens.ASCENDING_ORDER and CompareTokens.DESCENDING_ORDERException - An unrecoverable for the operation error occuredpublic URI compute(String keyFieldName, short order, ComparisonMethod comparisonMethod, ComparisonMode comparisonMode, SortAlgorithm algorithm) throws Exception
keyFieldName - The name of the Field which will be used as a sort keyorder - The order of the sorting. This can be one of CompareTokens.ASCENDING_ORDER and CompareTokens.DESCENDING_ORDERcomparisonMethod - The method of comparison. This can be one of ComparisonMethod.PROVIDED_MODE, ComparisonMethod.DETECT_MODE and ComparisonMethod.FULL_COMPARISONcomparisonMode - The mode of comparison, provided only if comparisonMethod=ComparisonMethod.PROVIDED_MODE.
This can be one of ComparisonMode.COMPARE_LONGINTS, ComparisonMode.COMPARE_DOUBLES, ComparisonMode.COMPARE_DATES and ComparisonMode.COMPARE_STRINGSException - An unrecoverable for the operation error occuredCopyright © 2017. All Rights Reserved.