public class MultiWriter extends DataWriter
DataWriter.| Modifier and Type | Class and Description |
|---|---|
static class |
MultiWriter.AvailableCapacityWriteStrategy
Writes each record to a single writer by choosing the one with the
highest available capacity (
DataWriter.available() If all writers
have identical capacities, this strategy behaves like
MultiWriter.RoundRobinWriteStrategy and writes to each writer in turn. |
static class |
MultiWriter.ReplicateCloneWriteStrategy
Writes a clone (to prevent side effects) of each record to all writers.
|
static class |
MultiWriter.ReplicateWriteStrategy
Writes each record to all writers.
|
static class |
MultiWriter.RoundRobinWriteStrategy
Divides records evenly between all writers by cycling through the list
and writing each record to a single writer in turn.
|
static class |
MultiWriter.WriteStrategy |
DataEndpoint.State| Modifier and Type | Field and Description |
|---|---|
static MultiWriter.WriteStrategy |
REPLICATE
|
static MultiWriter.WriteStrategy |
REPLICATE_CLONE
|
lastRecord, PRODUCT, PRODUCT_VERSION, VENDOR, XML_INPUT_FACTORY_KEYBUFFER_SIZE, captureElapsedTime, DEFAULT_READ_BUFFER_SIZEid, log, name, TIMESTAMP_FORMAT| Constructor and Description |
|---|
MultiWriter() |
MultiWriter(DataWriter... sinks) |
MultiWriter(MultiWriter.WriteStrategy writeStrategy) |
| Modifier and Type | Method and Description |
|---|---|
MultiWriter |
add(DataWriter... sinks) |
DataException |
addExceptionProperties(DataException exception)
Adds this endpoint's current state to a
DataException. |
void |
close()
Indicates that this endpoint has finished reading or writing.
|
DataEndpoint |
get(int index) |
int |
getCount() |
MultiWriter.WriteStrategy |
getWriteStrategy() |
void |
open()
Makes this endpoint ready for reading or writing.
|
MultiWriter |
remove(DataWriter sink) |
MultiWriter |
removeAllDataSink() |
MultiWriter |
setWriteStrategy(MultiWriter.WriteStrategy writeStrategy) |
protected void |
writeImpl(Record record)
Overridden by subclasses to write the specified record to this
DataWriter. |
available, getNestedEndpoint, getNestedWriter, getRootEndpoint, getRootWriter, getWriter, writedecrementRecordCount, enableJmx, getLastRecord, getRecordCount, getRecordCountAsBigInteger, getRecordCountAsString, incrementRecordCount, isRecordCountBigInteger, resetRecordCount, toStringaddElapsedtime, assertClosed, assertNotOpened, assertOpened, finalize, getClosedOn, getDescription, getElapsedTime, getElapsedTimeAsString, getOpenedOn, getOpenElapsedTime, getOpenElapsedTimeAsString, getSelfTime, getSelfTimeAsString, getState, isCaptureElapsedTime, isClosed, isOpen, setCaptureElapsedTime, setDescriptionpublic static final MultiWriter.WriteStrategy REPLICATE
public static final MultiWriter.WriteStrategy REPLICATE_CLONE
public MultiWriter()
public MultiWriter(MultiWriter.WriteStrategy writeStrategy)
public MultiWriter(DataWriter... sinks)
public MultiWriter.WriteStrategy getWriteStrategy()
public MultiWriter setWriteStrategy(MultiWriter.WriteStrategy writeStrategy)
public MultiWriter add(DataWriter... sinks)
public int getCount()
public MultiWriter remove(DataWriter sink)
public MultiWriter removeAllDataSink()
public DataEndpoint get(int index)
public void open()
throws DataException
DataEndpointopen in class DataEndpointDataExceptionpublic void close()
throws DataException
DataEndpointclose in class DataEndpointDataExceptionprotected void writeImpl(Record record) throws Throwable
DataWriterDataWriter.writeImpl in class DataWriterThrowablepublic 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 DataWriterCopyright (c) 2006-2025 North Concepts Inc. All Rights Reserved.