public class TeeReader 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 |
---|
TeeReader(DataReader nestedDataReader,
DataWriter writer)
Creates a new TeeReader.
|
TeeReader(DataReader nestedDataReader,
DataWriter writer,
boolean cloneRecord)
Creates a new TeeReader.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Indicates that this endpoint has finished reading or writing.
|
protected Record |
interceptRecord(Record record) |
boolean |
isCloneRecord()
Indicates if a copy of the original record should be sent to the writer (default false), otherwise the original record is sent to the writer.
|
void |
open()
Makes this endpoint ready for reading or writing.
|
addExceptionProperties, available, getNestedReader, map, map, readImpl, 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 TeeReader(DataReader nestedDataReader, DataWriter writer, boolean cloneRecord)
nestedDataReader
- the previous reader in this pipeline.writer
- the sink to receive records passing through this proxy.cloneRecord
- Indicates if a copy of the original record should be sent to the writer instead of the
original record itself (default false). If the original record is sent to the writer, any changes made by the
writer will be seen by subsequent steps in the primary pipeline.public TeeReader(DataReader nestedDataReader, DataWriter writer)
nestedDataReader
- the previous reader in this pipeline.writer
- the sink to receive records passing through this proxy.public boolean isCloneRecord()
public void open() throws DataException
DataEndpoint
open
in class ProxyReader
DataException
public void close() throws DataException
DataEndpoint
close
in class ProxyReader
DataException
protected Record interceptRecord(Record record) throws Throwable
interceptRecord
in class ProxyReader
Throwable
Copyright (c) 2006-2024 North Concepts Inc. All Rights Reserved.