public abstract class DataWriter extends DataEndpoint
writeImpl(Record),
however, most subclasses will also override DataEndpoint.open() and DataEndpoint.close().DataEndpoint.StatelastRecord, PRODUCT, PRODUCT_VERSION, VENDOR, XML_INPUT_FACTORY_KEYBUFFER_SIZE, captureElapsedTime, DEFAULT_READ_BUFFER_SIZEid, log, name, TIMESTAMP_FORMAT| Constructor and Description |
|---|
DataWriter() |
| Modifier and Type | Method and Description |
|---|---|
DataException |
addExceptionProperties(DataException exception)
Adds this endpoint's current state to a
DataException. |
int |
available()
Returns the number of records that can probably be written without blocking.
|
DataWriter |
getNestedEndpoint()
Returns the
Endpoint held inside this one or null if there isn't one. |
DataWriter |
getNestedWriter()
Returns the
DataWriter held inside this one or null if there isn't one. |
DataWriter |
getRootEndpoint()
Returns the deepest, nested
Endpoint held inside this one, otherwise this instance is returned if
there aren't any nested Endpoints. |
DataWriter |
getRootWriter()
Returns the deepest, nested
DataWriter held inside this one, otherwise this instance is returned if
there aren't any nested DataWriters. |
<T extends DataWriter> |
getWriter(Class<T> type)
Returns the first
DataWriter of the specified type held inside this one or null if there isn't one. |
void |
write(Record record)
Writes the specified record to this
DataWriter and increases the record-count by 1. |
protected abstract void |
writeImpl(Record record)
Overridden by subclasses to write the specified record to this
DataWriter. |
close, decrementRecordCount, enableJmx, getLastRecord, getRecordCount, getRecordCountAsBigInteger, getRecordCountAsString, incrementRecordCount, isRecordCountBigInteger, open, resetRecordCount, toStringaddElapsedtime, assertClosed, assertNotOpened, assertOpened, finalize, getClosedOn, getDescription, getElapsedTime, getElapsedTimeAsString, getOpenedOn, getOpenElapsedTime, getOpenElapsedTimeAsString, getSelfTime, getSelfTimeAsString, getState, isCaptureElapsedTime, isClosed, isOpen, setCaptureElapsedTime, setDescriptionpublic DataWriter getNestedEndpoint()
EndpointEndpoint held inside this one or null if there isn't one.getNestedEndpoint in class DataEndpointpublic DataWriter getRootEndpoint()
EndpointEndpoint held inside this one, otherwise this instance is returned if
there aren't any nested Endpoints.getRootEndpoint in class DataEndpointpublic DataWriter getNestedWriter()
DataWriter held inside this one or null if there isn't one.public <T extends DataWriter> T getWriter(Class<T> type)
DataWriter of the specified type held inside this one or null if there isn't one.public DataWriter getRootWriter()
DataWriter held inside this one, otherwise this instance is returned if
there aren't any nested DataWriters.public int available()
throws DataException
DataExceptionprotected abstract void writeImpl(Record record) throws Throwable
DataWriter.Throwablepublic void write(Record record) throws DataException
DataWriter and increases the record-count by 1.
Any exception raised while writing will be converted to a DataException using DataObject.exception(Throwable).
Subclasses generally do not need to override this method, instead they should implement writeImpl(Record).
DataExceptionpublic 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 DataEndpointCopyright (c) 2006-2025 North Concepts Inc. All Rights Reserved.