Class NettyConnectionReaderImpl
java.lang.Object
org.apache.flink.runtime.io.network.partition.hybrid.tiered.netty.NettyConnectionReaderImpl
- All Implemented Interfaces:
NettyConnectionReader
The default implementation of
NettyConnectionReader.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintReturns the index of the subpartition where the next buffer locates, or -1 if there is no buffer available and the subpartition to be consumed is not determined.readBuffer(int subpartitionId, int segmentId) Read a buffer from netty connection.
-
Constructor Details
-
NettyConnectionReaderImpl
-
-
Method Details
-
peekNextBufferSubpartitionId
Description copied from interface:NettyConnectionReaderReturns the index of the subpartition where the next buffer locates, or -1 if there is no buffer available and the subpartition to be consumed is not determined.- Specified by:
peekNextBufferSubpartitionIdin interfaceNettyConnectionReader- Throws:
IOException
-
readBuffer
Description copied from interface:NettyConnectionReaderRead a buffer from netty connection.- Specified by:
readBufferin interfaceNettyConnectionReader- Parameters:
subpartitionId- the subpartition where the buffer locates.segmentId- segment id indicates the id of segment.- Returns:
Optional.empty()will be returned if there is no buffer sent from netty connection otherwise a buffer will be returned.
-