Class AbstractReader
java.lang.Object
org.apache.flink.runtime.io.network.api.reader.AbstractReader
- All Implemented Interfaces:
ReaderBase
- Direct Known Subclasses:
MutableRecordReader,RecordReader
A basic reader implementation, which wraps an input gate and handles events.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanhandleEvent(AbstractEvent event) Handles the event and returns whether the reader reached an end-of-stream event (either the end of the whole stream or the end of an superstep).booleanbooleanReturns whether the reader has consumed the input.voidvoidregisterTaskEventListener(EventListener<TaskEvent> listener, Class<? extends TaskEvent> eventType) voidsendTaskEvent(TaskEvent event) voidvoid
-
Field Details
-
inputGate
The input gate to read from.
-
-
Constructor Details
-
AbstractReader
-
-
Method Details
-
isFinished
public boolean isFinished()Description copied from interface:ReaderBaseReturns whether the reader has consumed the input.- Specified by:
isFinishedin interfaceReaderBase
-
registerTaskEventListener
public void registerTaskEventListener(EventListener<TaskEvent> listener, Class<? extends TaskEvent> eventType) - Specified by:
registerTaskEventListenerin interfaceReaderBase
-
sendTaskEvent
- Specified by:
sendTaskEventin interfaceReaderBase- Throws:
IOException
-
handleEvent
Handles the event and returns whether the reader reached an end-of-stream event (either the end of the whole stream or the end of an superstep).- Throws:
IOException
-
publish
-
setIterativeReader
public void setIterativeReader()- Specified by:
setIterativeReaderin interfaceReaderBase
-
startNextSuperstep
public void startNextSuperstep()- Specified by:
startNextSuperstepin interfaceReaderBase
-
hasReachedEndOfSuperstep
public boolean hasReachedEndOfSuperstep()- Specified by:
hasReachedEndOfSuperstepin interfaceReaderBase
-