public interface NettyConnectionReader
NettyConnectionReader
is used by TierConsumerAgent
to read buffer from netty.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.
|
int peekNextBufferSubpartitionId() throws IOException
IOException
Optional<Buffer> readBuffer(int subpartitionId, int segmentId)
subpartitionId
- 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–2024 The Apache Software Foundation. All rights reserved.