Class ByteBufferChannel

java.lang.Object
org.apache.kafka.common.requests.ByteBufferChannel
All Implemented Interfaces:
Closeable, AutoCloseable, Channel, GatheringByteChannel, WritableByteChannel, org.apache.kafka.common.network.TransferableChannel

public class ByteBufferChannel extends Object implements org.apache.kafka.common.network.TransferableChannel
  • Constructor Details

    • ByteBufferChannel

      public ByteBufferChannel(long size)
  • Method Details

    • write

      public long write(ByteBuffer[] srcs, int offset, int length)
      Specified by:
      write in interface GatheringByteChannel
    • write

      public long write(ByteBuffer[] srcs)
      Specified by:
      write in interface GatheringByteChannel
    • write

      public int write(ByteBuffer src)
      Specified by:
      write in interface WritableByteChannel
    • isOpen

      public boolean isOpen()
      Specified by:
      isOpen in interface Channel
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Channel
      Specified by:
      close in interface Closeable
    • buffer

      public ByteBuffer buffer()
    • hasPendingWrites

      public boolean hasPendingWrites()
      Specified by:
      hasPendingWrites in interface org.apache.kafka.common.network.TransferableChannel
    • transferFrom

      public long transferFrom(FileChannel fileChannel, long position, long count) throws IOException
      Specified by:
      transferFrom in interface org.apache.kafka.common.network.TransferableChannel
      Throws:
      IOException
    • toBuffer

      public static ByteBuffer toBuffer(org.apache.kafka.common.network.Send send)
    • toBuffer

      public static ByteBuffer toBuffer(org.apache.kafka.common.record.internal.UnalignedRecords records)