public class ReclaimableMemoryRecords
extends org.apache.kafka.common.record.MemoryRecords
Modifier and Type | Field and Description |
---|---|
static ReclaimableMemoryRecords |
EMPTY |
Constructor and Description |
---|
ReclaimableMemoryRecords(java.nio.ByteBuffer buffer,
java.util.Optional<MemoryTracker.MemoryLease> lease) |
Modifier and Type | Method and Description |
---|---|
java.lang.Iterable<org.apache.kafka.common.record.MutableRecordBatch> |
batches() |
org.apache.kafka.common.utils.AbstractIterator<org.apache.kafka.common.record.MutableRecordBatch> |
batchIterator() |
java.nio.ByteBuffer |
buffer() |
org.apache.kafka.common.record.ConvertedRecords<org.apache.kafka.common.record.MemoryRecords> |
downConvert(byte toMagic,
long firstOffset,
org.apache.kafka.common.utils.Time time) |
boolean |
equals(java.lang.Object o) |
org.apache.kafka.common.record.MemoryRecords.FilterResult |
filterTo(org.apache.kafka.common.TopicPartition partition,
org.apache.kafka.common.record.MemoryRecords.RecordFilter filter,
java.nio.ByteBuffer destinationBuffer,
int maxRecordBatchSize,
org.apache.kafka.common.record.BufferSupplier decompressionBufferSupplier) |
org.apache.kafka.common.record.RecordBatch |
firstBatch() |
java.lang.Integer |
firstBatchSize() |
boolean |
hasCompatibleMagic(byte magic) |
int |
hashCode() |
boolean |
hasMatchingMagic(byte magic) |
java.lang.Iterable<org.apache.kafka.common.record.Record> |
records() |
void |
release() |
int |
sizeInBytes() |
org.apache.kafka.common.record.RecordsSend |
toSend(java.lang.String destination) |
java.lang.String |
toString() |
int |
validBytes() |
int |
writeFullyTo(java.nio.channels.GatheringByteChannel channel) |
long |
writeTo(java.nio.channels.GatheringByteChannel channel,
long position,
int length) |
builder, builder, builder, builder, builder, builder, builder, builder, builder, idempotentBuilder, readableRecords, withEndTransactionMarker, withEndTransactionMarker, withEndTransactionMarker, withIdempotentRecords, withIdempotentRecords, withIdempotentRecords, withRecords, withRecords, withRecords, withRecords, withRecords, withRecords, withRecords, withRecords, withTransactionalRecords, withTransactionalRecords, withTransactionalRecords, writeEndTransactionalMarker
public static final ReclaimableMemoryRecords EMPTY
public ReclaimableMemoryRecords(java.nio.ByteBuffer buffer, java.util.Optional<MemoryTracker.MemoryLease> lease)
public int sizeInBytes()
sizeInBytes
in interface org.apache.kafka.common.record.BaseRecords
sizeInBytes
in class org.apache.kafka.common.record.MemoryRecords
public long writeTo(java.nio.channels.GatheringByteChannel channel, long position, int length) throws java.io.IOException
writeTo
in interface org.apache.kafka.common.record.Records
writeTo
in class org.apache.kafka.common.record.MemoryRecords
java.io.IOException
public int writeFullyTo(java.nio.channels.GatheringByteChannel channel) throws java.io.IOException
writeFullyTo
in class org.apache.kafka.common.record.MemoryRecords
java.io.IOException
public int validBytes()
validBytes
in class org.apache.kafka.common.record.MemoryRecords
public org.apache.kafka.common.record.ConvertedRecords<org.apache.kafka.common.record.MemoryRecords> downConvert(byte toMagic, long firstOffset, org.apache.kafka.common.utils.Time time)
downConvert
in interface org.apache.kafka.common.record.Records
downConvert
in class org.apache.kafka.common.record.MemoryRecords
public org.apache.kafka.common.utils.AbstractIterator<org.apache.kafka.common.record.MutableRecordBatch> batchIterator()
batchIterator
in interface org.apache.kafka.common.record.Records
batchIterator
in class org.apache.kafka.common.record.MemoryRecords
public java.lang.Integer firstBatchSize()
firstBatchSize
in class org.apache.kafka.common.record.MemoryRecords
public org.apache.kafka.common.record.MemoryRecords.FilterResult filterTo(org.apache.kafka.common.TopicPartition partition, org.apache.kafka.common.record.MemoryRecords.RecordFilter filter, java.nio.ByteBuffer destinationBuffer, int maxRecordBatchSize, org.apache.kafka.common.record.BufferSupplier decompressionBufferSupplier)
filterTo
in class org.apache.kafka.common.record.MemoryRecords
public java.nio.ByteBuffer buffer()
buffer
in class org.apache.kafka.common.record.MemoryRecords
public java.lang.Iterable<org.apache.kafka.common.record.MutableRecordBatch> batches()
batches
in interface org.apache.kafka.common.record.Records
batches
in class org.apache.kafka.common.record.MemoryRecords
public boolean hasMatchingMagic(byte magic)
hasMatchingMagic
in interface org.apache.kafka.common.record.Records
hasMatchingMagic
in class org.apache.kafka.common.record.AbstractRecords
public boolean hasCompatibleMagic(byte magic)
hasCompatibleMagic
in interface org.apache.kafka.common.record.Records
hasCompatibleMagic
in class org.apache.kafka.common.record.AbstractRecords
public org.apache.kafka.common.record.RecordBatch firstBatch()
firstBatch
in class org.apache.kafka.common.record.AbstractRecords
public java.lang.Iterable<org.apache.kafka.common.record.Record> records()
records
in interface org.apache.kafka.common.record.Records
records
in class org.apache.kafka.common.record.AbstractRecords
public org.apache.kafka.common.record.RecordsSend toSend(java.lang.String destination)
toSend
in interface org.apache.kafka.common.record.BaseRecords
toSend
in class org.apache.kafka.common.record.AbstractRecords
public void release()
release
in interface org.apache.kafka.common.record.BaseRecords
release
in class org.apache.kafka.common.record.MemoryRecords
public java.lang.String toString()
toString
in class org.apache.kafka.common.record.MemoryRecords
public boolean equals(java.lang.Object o)
equals
in class org.apache.kafka.common.record.MemoryRecords
public int hashCode()
hashCode
in class org.apache.kafka.common.record.MemoryRecords