All Known Implementing Classes:
NettyConnectionReaderImpl

public interface NettyConnectionReader
NettyConnectionReader is used by TierConsumerAgent to read buffer from netty.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    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.
    readBuffer(int subpartitionId, int segmentId)
    Read a buffer from netty connection.
  • Method Details

    • 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.