public class SortingReader extends ProxyReader
DataEndpoint.State
fieldLineage, recordLineage
lastRecord, PRODUCT, PRODUCT_VERSION, VENDOR, XML_INPUT_FACTORY_KEY
BUFFER_SIZE, captureElapsedTime, DEFAULT_READ_BUFFER_SIZE
id, log, name, TIMESTAMP_FORMAT
Constructor and Description |
---|
SortingReader(DataReader reader) |
SortingReader(DataReader reader,
long bufferSize) |
Modifier and Type | Method and Description |
---|---|
SortingReader |
add(String fieldName) |
SortingReader |
add(String fieldName,
boolean ascending) |
SortingReader |
add(String fieldName,
boolean ascending,
Collator collator) |
SortingReader |
asc(String fieldName) |
void |
close()
Indicates that this endpoint has finished reading or writing.
|
static void |
copy(DataReader source,
DataWriter sink) |
SortingReader |
desc(String fieldName) |
DataReader |
getNestedReader()
Returns the
DataReader held inside this one or null if there isn't one. |
DataReader |
getNestedReader0() |
RecordComparator |
getOrder() |
boolean |
isCacheFieldIndexes() |
void |
open()
Makes this endpoint ready for reading or writing.
|
protected Record |
readImpl()
Overridden by subclasses to read the next record from this
DataReader . |
SortingReader |
setCacheFieldIndexes(boolean cacheFieldIndexes) |
addExceptionProperties, available, interceptRecord, map, map, setNestedDataReader, setNestedDataReader
addLineage, getBufferSize, getNestedEndpoint, getRootEndpoint, getRootReader, isExhausted, isLineageSupported, isSaveLineage, peek, pop, push, read, setSaveLineage, skip
decrementRecordCount, enableJmx, getLastRecord, getRecordCount, getRecordCountAsBigInteger, getRecordCountAsString, incrementRecordCount, isRecordCountBigInteger, resetRecordCount, toString
addElapsedtime, assertClosed, assertNotOpened, assertOpened, finalize, getClosedOn, getDescription, getElapsedTime, getElapsedTimeAsString, getOpenedOn, getOpenElapsedTime, getOpenElapsedTimeAsString, getSelfTime, getSelfTimeAsString, getState, isCaptureElapsedTime, isClosed, isOpen, setCaptureElapsedTime, setDescription
public SortingReader(DataReader reader, long bufferSize)
reader
- bufferSize
- memory buffer in bytespublic SortingReader(DataReader reader)
public DataReader getNestedReader()
DataReader
DataReader
held inside this one or null
if there isn't one.getNestedReader
in class ProxyReader
public DataReader getNestedReader0()
public boolean isCacheFieldIndexes()
public SortingReader setCacheFieldIndexes(boolean cacheFieldIndexes)
public RecordComparator getOrder()
public SortingReader add(String fieldName)
public SortingReader add(String fieldName, boolean ascending)
public SortingReader asc(String fieldName)
public SortingReader desc(String fieldName)
public SortingReader add(String fieldName, boolean ascending, Collator collator)
public void open()
DataEndpoint
open
in class ProxyReader
public void close() throws DataException
DataEndpoint
close
in class ProxyReader
DataException
protected Record readImpl() throws Throwable
DataReader
DataReader
. The default
implementation of DataReader.read()
now insures that this method will not be called again after it returns
a null
.
If no record is available, null
will be returned.
readImpl
in class ProxyReader
Throwable
public static void copy(DataReader source, DataWriter sink) throws Throwable
Throwable
Copyright (c) 2006-2023 North Concepts Inc. All Rights Reserved.