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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuffer()voidclose()booleanbooleanisOpen()static ByteBuffertoBuffer(org.apache.kafka.common.network.Send send) static ByteBuffertoBuffer(org.apache.kafka.common.record.internal.UnalignedRecords records) longtransferFrom(FileChannel fileChannel, long position, long count) intwrite(ByteBuffer src) longwrite(ByteBuffer[] srcs) longwrite(ByteBuffer[] srcs, int offset, int length)
-
Constructor Details
-
ByteBufferChannel
public ByteBufferChannel(long size)
-
-
Method Details
-
write
- Specified by:
writein interfaceGatheringByteChannel
-
write
- Specified by:
writein interfaceGatheringByteChannel
-
write
- Specified by:
writein interfaceWritableByteChannel
-
isOpen
-
close
-
buffer
-
hasPendingWrites
public boolean hasPendingWrites()- Specified by:
hasPendingWritesin interfaceorg.apache.kafka.common.network.TransferableChannel
-
transferFrom
- Specified by:
transferFromin interfaceorg.apache.kafka.common.network.TransferableChannel- Throws:
IOException
-
toBuffer
-
toBuffer
-