public class SequenceWriter extends ProxyWriter
Modifier and Type | Class and Description |
---|---|
static interface |
SequenceWriter.DataWriterFactory |
static class |
SequenceWriter.ElapsedTimeSequenceStrategy |
static interface |
SequenceWriter.ISequenceStrategy |
static class |
SequenceWriter.OrSequenceStrategy |
static class |
SequenceWriter.RecordCountSequenceStrategy |
static class |
SequenceWriter.SchedulerSequenceStrategy |
static class |
SequenceWriter.Sequence |
DataEndpoint.State
lastRecord, PRODUCT, PRODUCT_VERSION, VENDOR, XML_INPUT_FACTORY_KEY
BUFFER_SIZE, captureElapsedTime, DEFAULT_READ_BUFFER_SIZE
id, log, name, TIMESTAMP_FORMAT
Constructor and Description |
---|
SequenceWriter(SequenceWriter.ISequenceStrategy strategy,
SequenceWriter.DataWriterFactory factory) |
Modifier and Type | Method and Description |
---|---|
DataException |
addExceptionProperties(DataException exception)
Adds this endpoint's current state to a
DataException . |
protected void |
afterSequenceCreated() |
protected void |
afterSequenceFinished() |
protected void |
beforeSequenceCreated() |
void |
close()
Indicates that this endpoint has finished reading or writing.
|
SequenceWriter.Sequence |
getCurrentSequence()
Returns the current Sequence in use by this writer,
null if it hasn't started writing, or the last sequence if it has finished writing. |
SequenceWriter.DataWriterFactory |
getFactory() |
long |
getSequenceCount()
Deprecated.
use
getSequencesStarted() instead
The number of sequences created by this writer (alias for getSequencesStarted() ). |
long |
getSequencesFinished() |
long |
getSequencesStarted() |
SequenceWriter.ISequenceStrategy |
getStrategy() |
protected void |
writeImpl(Record record)
Overridden by subclasses to write the specified record to this
DataWriter . |
available, getNestedWriter, interceptRecord, map, map, open, setNestedDataWriter, setNestedDataWriter
getNestedEndpoint, getRootEndpoint, getRootWriter, write
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 SequenceWriter(SequenceWriter.ISequenceStrategy strategy, SequenceWriter.DataWriterFactory factory)
public SequenceWriter.ISequenceStrategy getStrategy()
public SequenceWriter.DataWriterFactory getFactory()
public long getSequencesStarted()
public long getSequencesFinished()
@Deprecated public long getSequenceCount()
getSequencesStarted()
instead
The number of sequences created by this writer (alias for getSequencesStarted()
).public SequenceWriter.Sequence getCurrentSequence()
null
if it hasn't started writing, or the last sequence if it has finished writing.protected void writeImpl(Record record) throws Throwable
DataWriter
DataWriter
.writeImpl
in class ProxyWriter
Throwable
protected void beforeSequenceCreated()
protected void afterSequenceCreated()
protected void afterSequenceFinished()
public void close() throws DataException
DataEndpoint
close
in class ProxyWriter
DataException
public DataException addExceptionProperties(DataException exception)
Endpoint
DataException
. Since this method is called whenever an
exception is thrown, subclasses should override it to add their specific information.addExceptionProperties
in class ProxyWriter
Copyright (c) 2006-2024 North Concepts Inc. All Rights Reserved.