Interface NettyConnectionReader

    • Method Detail

      • peekNextBufferSubpartitionId

        int peekNextBufferSubpartitionId()
                                  throws IOException
        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.
        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.