public class NettyConnectionReaderImpl extends Object implements NettyConnectionReader
NettyConnectionReader.| Constructor and Description |
|---|
NettyConnectionReaderImpl(Supplier<InputChannel> inputChannelProvider) |
| Modifier and Type | Method and Description |
|---|---|
int |
peekNextBufferSubpartitionId()
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.
|
public NettyConnectionReaderImpl(Supplier<InputChannel> inputChannelProvider)
public int peekNextBufferSubpartitionId()
throws IOException
NettyConnectionReaderpeekNextBufferSubpartitionId in interface NettyConnectionReaderIOExceptionpublic Optional<Buffer> readBuffer(int subpartitionId, int segmentId)
NettyConnectionReaderreadBuffer in interface NettyConnectionReadersubpartitionId - the subpartition where the buffer locates.segmentId - segment id indicates the id of segment.Optional.empty() will be returned if there is no buffer sent from netty
connection otherwise a buffer will be returned.Copyright © 2014–2025 The Apache Software Foundation. All rights reserved.