Class SortBasedDataBuffer
- java.lang.Object
-
- org.apache.flink.runtime.io.network.partition.SortBuffer
-
- org.apache.flink.runtime.io.network.partition.SortBasedDataBuffer
-
- All Implemented Interfaces:
DataBuffer
@NotThreadSafe public class SortBasedDataBuffer extends SortBuffer
When getting buffers, TheSortBasedDataBuffershould recycle the read target buffer with the givenBufferRecycler.
-
-
Field Summary
-
Fields inherited from class org.apache.flink.runtime.io.network.partition.SortBuffer
bufferRecycler, freeSegments, INDEX_ENTRY_SIZE, isFinished, isReleased, lastIndexEntryAddresses, numTotalBytesRead, readIndexEntryAddress, readOrderIndex, recordRemainingBytes, segments, subpartitionReadOrder
-
-
Constructor Summary
Constructors Constructor Description SortBasedDataBuffer(LinkedList<org.apache.flink.core.memory.MemorySegment> freeSegments, BufferRecycler bufferRecycler, int numSubpartitions, int bufferSize, int numGuaranteedBuffers, int[] customReadOrder)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BufferWithSubpartitiongetNextBuffer(org.apache.flink.core.memory.MemorySegment transitBuffer)Copies data in thisDataBufferto the targetMemorySegmentin subpartition index order and returnsBufferWithSubpartitionwhich contains the copied data and the corresponding subpartition index.-
Methods inherited from class org.apache.flink.runtime.io.network.partition.SortBuffer
append, copyRecordOrEvent, finish, getSegmentIndexFromPointer, getSegmentOffsetFromPointer, hasRemaining, isFinished, isReleased, numTotalBytes, numTotalRecords, release, updateReadSubpartitionAndIndexEntryAddress
-
-
-
-
Constructor Detail
-
SortBasedDataBuffer
public SortBasedDataBuffer(LinkedList<org.apache.flink.core.memory.MemorySegment> freeSegments, BufferRecycler bufferRecycler, int numSubpartitions, int bufferSize, int numGuaranteedBuffers, @Nullable int[] customReadOrder)
-
-
Method Detail
-
getNextBuffer
public BufferWithSubpartition getNextBuffer(org.apache.flink.core.memory.MemorySegment transitBuffer)
Description copied from interface:DataBufferCopies data in thisDataBufferto the targetMemorySegmentin subpartition index order and returnsBufferWithSubpartitionwhich contains the copied data and the corresponding subpartition index.
-
-