public class EventBusReader extends DataReader
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 |
---|
EventBusReader(EventBus eventBus,
int queueCapacity,
Object... topics) |
EventBusReader(EventBus eventBus,
Object... topics) |
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 read without blocking.
|
void |
close()
Indicates that this endpoint has finished reading or writing.
|
EventBus |
getEventBus() |
EventFilter |
getEventFilter() |
String |
getTopicFieldName()
Returns the field name used to add the delivery topic to each record or
null if the topic should not be added to records (defaults to null ). |
Object[] |
getTopics() |
boolean |
isStopOnWriterEOF()
Indicates if this reader should stop reading from the event bus when any event bus writer on the same topic finishes (default to true).
|
void |
open()
Makes this endpoint ready for reading or writing.
|
protected Record |
readImpl()
Overridden by subclasses to read the next record from this
DataReader . |
EventBusReader |
setEventFilter(EventFilter eventFilter) |
EventBusReader |
setStopOnWriterEOF(boolean stopOnReaderEOF)
Indicates if this reader should stop reading from the event bus when any event bus writer on the same topic finishes (default to true).
|
EventBusReader |
setTopicFieldName(String topicFieldName)
Assigns the field name to use when adding the delivery topic to each record or
null if the topic should not be added to records (defaults to null ). |
EventBusReader |
setTopics(Object... topics) |
String |
toString() |
addLineage, getBufferSize, getNestedEndpoint, getNestedReader, getRootEndpoint, getRootReader, isExhausted, isLineageSupported, isSaveLineage, peek, pop, push, read, setSaveLineage, skip
decrementRecordCount, enableJmx, getLastRecord, getRecordCount, getRecordCountAsBigInteger, getRecordCountAsString, incrementRecordCount, isRecordCountBigInteger, resetRecordCount
addElapsedtime, assertClosed, assertNotOpened, assertOpened, finalize, getClosedOn, getDescription, getElapsedTime, getElapsedTimeAsString, getOpenedOn, getOpenElapsedTime, getOpenElapsedTimeAsString, getSelfTime, getSelfTimeAsString, getState, isCaptureElapsedTime, isClosed, isOpen, setCaptureElapsedTime, setDescription
public EventBus getEventBus()
public Object[] getTopics()
public EventBusReader setTopics(Object... topics)
public String getTopicFieldName()
null
if the topic should not be added to records (defaults to null
).public EventBusReader setTopicFieldName(String topicFieldName)
null
if the topic should not be added to records (defaults to null
).public EventFilter getEventFilter()
public EventBusReader setEventFilter(EventFilter eventFilter)
public boolean isStopOnWriterEOF()
public EventBusReader setStopOnWriterEOF(boolean stopOnReaderEOF)
public void open() throws DataException
DataEndpoint
open
in class DataEndpoint
DataException
public void close() throws DataException
DataEndpoint
close
in class DataEndpoint
DataException
public int available() throws DataException
DataReader
available
in class DataReader
DataException
protected Record readImpl() throws Throwable
DataReader
DataReader
. The default
implementation of DataReader.read()
now insures that this method will not be called again after it returns
a null
.
If no record is available, null
will be returned.
readImpl
in class DataReader
Throwable
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 DataReader
public String toString()
toString
in class DataEndpoint
Copyright (c) 2006-2024 North Concepts Inc. All Rights Reserved.