public abstract class AbstractUnionRecordReader<T extends IOReadableWritable> extends AbstractRecordReader implements RecordAvailabilityListener<T>
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractUnionRecordReader(MutableRecordReader<T>[] recordReaders)
Constructs a new mutable union record reader.
|
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
getNextRecord(T target) |
boolean |
isInputClosed() |
void |
publishEvent(AbstractTaskEvent event)
Publishes an event.
|
void |
reportRecordAvailability(InputGate<T> inputGate)
This method is called by an input gate when one of its connected input channels has at least one record available
for reading.
|
handleEvent, hasReachedEndOfSuperstep, incrementEndOfSuperstepEventAndCheck, setIterative, startNextSuperstep, subscribeToEvent, unsubscribeFromEventprotected AbstractUnionRecordReader(MutableRecordReader<T>[] recordReaders)
recordReaders - the individual mutable record readers whose input is used to construct the unionpublic boolean isInputClosed()
isInputClosed in interface ReaderBasepublic void publishEvent(AbstractTaskEvent event) throws IOException, InterruptedException
ReaderBasepublishEvent in interface ReaderBaseevent - the event to be publishedIOException - thrown if an error occurs while transmitting the eventInterruptedException - thrown if the thread is interrupted while waiting for the event to be publishedpublic void reportRecordAvailability(InputGate<T> inputGate)
RecordAvailabilityListenerreportRecordAvailability in interface RecordAvailabilityListener<T extends IOReadableWritable>inputGate - the input gate which has at least one record availableprotected boolean getNextRecord(T target) throws IOException, InterruptedException
IOExceptionInterruptedExceptionCopyright © 2014 The Apache Software Foundation. All rights reserved.