public class TimedReader extends ProxyReader
DataEndpoint.StatefieldLineage, recordLineagelastRecord, PRODUCT, PRODUCT_VERSION, VENDOR, XML_INPUT_FACTORY_KEYBUFFER_SIZE, captureElapsedTime, DEFAULT_READ_BUFFER_SIZEid, log, name, TIMESTAMP_FORMAT| Constructor and Description |
|---|
TimedReader(DataReader reader,
long maxTime) |
| Modifier and Type | Method and Description |
|---|---|
DataException |
addExceptionProperties(DataException exception)
Adds this endpoint's current state to a
DataException. |
void |
close()
Indicates that this endpoint has finished reading or writing.
|
long |
getMaxTime() |
boolean |
isTimeExpired()
Returns
true if reading stopped due to the time expiring. |
void |
open()
Makes this endpoint ready for reading or writing.
|
Record |
read()
Reads the next record from this
DataReader and increases the record-count by 1. |
String |
toString() |
available, getNestedReader, interceptRecord, map, map, readImpl, setNestedDataReader, setNestedDataReaderaddLineage, getBufferSize, getNestedEndpoint, getReader, getRootEndpoint, getRootReader, isExhausted, isLineageSupported, isSaveLineage, peek, pop, push, setSaveLineage, skipdecrementRecordCount, enableJmx, getLastRecord, getRecordCount, getRecordCountAsBigInteger, getRecordCountAsString, incrementRecordCount, isRecordCountBigInteger, resetRecordCountaddElapsedtime, assertClosed, assertNotOpened, assertOpened, finalize, getClosedOn, getDescription, getElapsedTime, getElapsedTimeAsString, getOpenedOn, getOpenElapsedTime, getOpenElapsedTimeAsString, getSelfTime, getSelfTimeAsString, getState, isCaptureElapsedTime, isClosed, isOpen, setCaptureElapsedTime, setDescriptionpublic TimedReader(DataReader reader, long maxTime)
public long getMaxTime()
public void open()
throws DataException
DataEndpointopen in class ProxyReaderDataExceptionpublic void close()
throws DataException
DataEndpointclose in class ProxyReaderDataExceptionpublic Record read()
DataReaderDataReader and increases the record-count by 1.
This method will first read any pushed (DataReader.push(Record)) records before reading from the underlying source.
If no record is available, null will be returned. This method blocks until a record is available,
the end of the stream is reached, or an exception is thrown.
Any exception raised while reading will be converted to a DataException using DataObject.exception(Throwable).
Subclasses generally do not need to override this method, instead they should implement DataReader.readImpl().
read in class DataReaderDataReader.push(Record),
DataReader.peek(int),
DataReader.read()public DataException addExceptionProperties(DataException exception)
EndpointDataException. Since this method is called whenever an
exception is thrown, subclasses should override it to add their specific information.addExceptionProperties in class ProxyReaderpublic String toString()
toString in class DataEndpointpublic boolean isTimeExpired()
true if reading stopped due to the time expiring.Copyright (c) 2006-2025 North Concepts Inc. All Rights Reserved.