|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.northconcepts.datapipeline.core.DataEndpoint
com.northconcepts.datapipeline.core.DataWriter
public abstract class DataWriter
Abstract super-class for writing records. The only method that a subclass must implement is writeImpl(Record),
however, most subclasses will also override DataEndpoint.open() and DataEndpoint.close().
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class com.northconcepts.datapipeline.core.DataEndpoint |
|---|
DataEndpoint.State |
| Field Summary |
|---|
| Fields inherited from class com.northconcepts.datapipeline.core.DataEndpoint |
|---|
BUFFER_SIZE, log |
| Constructor Summary | |
|---|---|
DataWriter()
|
|
| Method Summary | |
|---|---|
DataException |
addExceptionProperties(DataException exception)
Adds this endpoint's current state to a DataException. |
DataWriter |
getNestedWriter()
Returns the DataWriter held inside this one or null if there isn't one. |
DataWriter |
getRootWriter()
Returns the deepest, nested DataWriter held inside this one, otherwise this instance is returned if
there aren't any nested DataWriters. |
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. |
| Methods inherited from class com.northconcepts.datapipeline.core.DataEndpoint |
|---|
assertNotOpened, assertOpened, close, decrementRecordCount, exception, exception, exception, finalize, getRecordCount, getRecordCountAsBigInteger, getRecordCountAsString, getState, incrementRecordCount, isClosed, isOpen, isRecordCountBigInteger, open, resetRecordCount, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public DataWriter()
| Method Detail |
|---|
public DataWriter getNestedWriter()
DataWriter 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.
protected abstract void writeImpl(Record record)
throws Throwable
DataWriter.
Throwable
public 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 DataEndpoint.exception(Throwable).
Subclasses generally do not need to override this method, instead they should implement writeImpl(Record).
DataExceptionpublic DataException addExceptionProperties(DataException exception)
DataEndpointDataException. Since this method is called whenever an
exception is thrown, subclasses should override it to add their specific information.
addExceptionProperties in class DataEndpoint
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||