public interface SortBuffer
SortBuffer and after the SortBuffer is finished, the appended data can be copied from it in channel index order.| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
append(ByteBuffer source,
int targetChannel,
Buffer.DataType dataType)
Appends data of the specified channel to this
SortBuffer and returns true if all
bytes of the source buffer is copied to this SortBuffer successfully, otherwise if
returns false, nothing will be copied. |
BufferWithChannel |
copyIntoSegment(org.apache.flink.core.memory.MemorySegment target)
Copies data in this
SortBuffer to the target MemorySegment in channel index
order and returns BufferWithChannel which contains the copied data and the
corresponding channel index. |
void |
finish()
Finishes this
SortBuffer which means no record can be appended any more. |
boolean |
hasRemaining()
Returns true if there is still data can be consumed in this
SortBuffer. |
boolean |
isFinished()
Whether this
SortBuffer is finished or not. |
boolean |
isReleased()
Whether this
SortBuffer is released or not. |
long |
numBytes()
Returns the number of bytes written to this
SortBuffer. |
long |
numRecords()
Returns the number of records written to this
SortBuffer. |
void |
release()
Releases this
SortBuffer which releases all resources. |
boolean append(ByteBuffer source, int targetChannel, Buffer.DataType dataType) throws IOException
SortBuffer and returns true if all
bytes of the source buffer is copied to this SortBuffer successfully, otherwise if
returns false, nothing will be copied.IOExceptionBufferWithChannel copyIntoSegment(org.apache.flink.core.memory.MemorySegment target)
SortBuffer to the target MemorySegment in channel index
order and returns BufferWithChannel which contains the copied data and the
corresponding channel index.long numRecords()
SortBuffer.long numBytes()
SortBuffer.boolean hasRemaining()
SortBuffer.void finish()
SortBuffer which means no record can be appended any more.boolean isFinished()
SortBuffer is finished or not.void release()
SortBuffer which releases all resources.boolean isReleased()
SortBuffer is released or not.Copyright © 2014–2022 The Apache Software Foundation. All rights reserved.