Interface NettyConnectionReader
-
- All Known Implementing Classes:
NettyConnectionReaderImpl
public interface NettyConnectionReaderNettyConnectionReaderis used byTierConsumerAgentto read buffer from netty.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description intpeekNextBufferSubpartitionId()Returns 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.Optional<Buffer>readBuffer(int subpartitionId, int segmentId)Read a buffer from netty connection.
-
-
-
Method Detail
-
peekNextBufferSubpartitionId
int peekNextBufferSubpartitionId() throws IOExceptionReturns 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.- Throws:
IOException
-
readBuffer
Optional<Buffer> readBuffer(int subpartitionId, int segmentId)
Read a buffer from netty connection.- 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.
-
-